Hi I need to create a regular Expression that will match the following pattern:
{ any characters } in a string. Possible Examples of the string:
Example 1:
{123} abc {456} def {789}hg
should return 3 matches:
{123},{456} and {789}
Example 2:
abcd{{{r} 345 } {mmm}
should return 2 mathces {r} and {mmm}
So basically the expression should match { any chacraters any number of times that are not {} and then the closing }
So far I have come up with this but it’s not working :
{*[^{]}
Thanks very much in advance
Here’s the one you need: