On Mon, 11 Mar 2002, F.Xavier Noria wrote:

> I am not familiar with recursive regexps, not to mention their use in
> substitutions (room for playing until next April 1st :-)  Have you find
> situations in everyday code where they apply naturally?  Would the
> secret number problem be solved using a recursive regexp?
> 

Well, I think the canonical example is the problem of matching nested
parentheses. If you have the Camel book, the code and the explanation are
on pages 213-214. And yes, I have actually used this in real life.

I'd be interested to know of other real examples too.

-- 
Stephen Turner, Cambridge, UK    http://homepage.ntlworld.com/adelie/stephen/
"This is Henman's 8th Wimbledon, and he's only lost 7 matches." BBC, 2/Jul/01

Reply via email to