Hi everybody,
i'm using regular expressions to filter thing from a
String.
Can a regular expression be recursive?
I need a expression (that works in org.apache.regexp.RE) that parses something like a function. A function starts with '${' and ends with '}'. But in the text between there can also be new 'instances' of ${...}
Eg.
When parsing the string "bla bla${bla ${bla} ${bla}}bla ${bla} bla" the first thing the epxression needs to give me is "${bla ${bla} ${bla}}"
I'm not very good with expression and have been using \$\{.+?\} as an expression at the moment, but that wont give me the right results.
Does anybody have a good idea for a working expression? Or should i be writing my own parsing routine?
Thanks in advance,
Robert Willems