I want to extract all the words enclosed in braces, so I have expressions such as
foo {bar} moo {mar}
The matching string can have any number of these words, but I'm starting to think that I am approaching this problem incorrectly.
My attempt
And I tried to extract the bracket words into groups so that I could use every single match. So, I made a regex:
String rx = ".*\\{({GROUP}\\w+)\\}.*";
Note. I use JRegex syntax, so I need to get away from some curls.
Result
- ( ) bar, bar mar. ? , , - ., , .
!