in reply to Recursive regex
Update 18:15 UTC: sorry, I had to make the above short 15 minutes ago as my train was arriving in my home town. To be a bit more specific: $np is a regular expression looking for an opening parenthesis, followed by something, followed by a closing parenthesis, that something being any number of occurrences of either sequences of non parentheses characters, or patterns matched recursively by $np itself (i.e. more deeply nested sets of parens).
Look at the example given, try it as it is and try it with an additional opening or closing parentheses, so that the parens no longer match. I guess you'll get it.
|
|---|