From: Ben Tilly Date: 2001-01-11T12:06:06+09:00 Subject: [ruby-talk:9097] Re: Regexp for matching Ruby reg exps? gotoken@math.sci.hokudai.ac.jp (GOTO Kentaro) wrote: > >In message "[ruby-talk:9078] Re: Regexp for matching Ruby reg exps?" > on 01/01/11, "Ben Tilly" writes: > >Friedl's solution only handles nesting to a limited depth. > >Enough for parsing email addresses but not a general > >solution. Not only is handling arbitrary nesting in a > >Oh, I misread the book :-< > > > perldoc -q nesting > > > >Yup. Perl's documentation agrees with me. Can't be done > >in Perl with a straight regular expression. > >I didn't know that document. Thank you very much. Perl's documentation would fill enormous volumes. Literally. But there is a lot of good stuff in there. >Now, I have a question: Any any formal proofs of the impossibleness >known for a extended RE? In other words, what extension can buil a >stack? I am sure that a proof is known. But I can't lay my hands on it. However when I was asking at PerlMonks Daniel Chetlin directed me to this: http://www.perlmonks.org/index.pl?node_id=38942 So while Perl 5.005 cannot do it, with 5.6 Perl now has enough extensions that it can. > >Writing negative patterns in any regular expression engine > >tends to be difficult. I claim that this is a limitation > >inherent in the RE view of the world, and not to any > >specific implementation. > >I agree. > >Btw, when I started learning RE of a programming language after had >gotten a unit of language theory, I was confused by the different >between theoretical one and that; They have same name and very >confuging (at least for me :-) There was some discussion on whether Perl should change what they are called in its documentation since they long ago ceased to be regular expressions by any stretch of the imagination, but the name is so widely used that the choice was made to just leave it. Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com