0

I'm not too experienced with regex, and I can't figure out how to get the match I want. Suppose you have the string

This is some text here. {p1:This is some inner text{\s1:even more inner!}{l1:blah}} and {l1:another}

What I want to do is match anything that starts with an open curly brace and ends with a closed curly brace. A match could have an inner open/close curly brace. The above string should have 2 matches:

{p1:This is some inner text{\s1:even more inner!}{l1:blah}}
{l1:another}

I've spent like an hour at regexr.com trying things like {\\?\D\d:(.|({.*}))*}

but at this point I'm super confused.

revo
  • 47,783
  • 14
  • 74
  • 117
Jeffrey Van Laethem
  • 2,601
  • 1
  • 20
  • 30

0 Answers0