I have the following text:
[[{"type":"media","view_mode":"media_original","fid":"19125","attributes":{"alt":"","class":"media-image","height":"480","typeof":"foaf:Image","width":"480"}}]]
Sed iaculis, nisl vel accumsan condimentum, orci felis congue pede, nec pharetra quam ante nec ligula.
[[{"type":"media","view_mode":"media_original","fid":"16145","attributes":{"alt":"","class":"media-image","height":"480","typeof":"foaf:Image","width":"480"}}]]
I want to select the first paragraph of the text (section in brackets), based on the fid (19125).
This is my current regexp:
[\[].[^;]*[\]\)]]
But right now it will find both occurrences. I'd like to adjust this so it only gets the one with the correct fid (19125).
json_decodeand get the value?\[{2}{.*"fid"\s*:\s*"19125".*