Regular expression to find in Sublime Text

25 Views Asked by At

I need to find all cases in a large json file in a text editor called sublime text

"lsid" : { "id" : UUID("03006811") },

where instead of 03006811 there can be anything. And then replace.

I tried "lsid":\s*{[^}]+}" and some other ways but unsuccessful. Expecting to find all 487 cases with all different values instead 03006811 and then want to replace it.

1

There are 1 best solutions below

0
hersh On BEST ANSWER

The following pattern should match "lsid" : { "id" : UUID("03006811") } and it will work for any other alphanumeric value inside the UUID as well

"lsid"\s*:\s*\{\s*"id"\s*:\s*UUID\("([0-9a-fA-F]+)"\)\s*\}