Using regex to retrieve all text inside parentheses
Hi. My program will be parsing syntax coming from the user, and certain bits of data will be designated inside parentheses (like a URL or date, for instance).
Since multiple parentheses will probably show up in the syntax, I don't want to settle for finding the index of an opening parenthesis and substringing the rest from there.
Is there any way to accomplish this task in regex?
I want to store each string found between each set of parentheses in a List and parse each string individually.
String syntax = "foo foo (12-12-10)(http://www.foo.bar)";
List fromParentheses = returnEverythingInsideEachParentheses(syntax);