in reply to Re: ERROR ... nested quantifiers in regex
in thread ERROR ... nested quantifiers in regex

Would you please provide some notations to the code you just posted !! because I'm still a newbie in regex especially the freaky nested regex.

Besides, Do you have any simple reference that helps understanding regex with all its tricks !!

  • Comment on Re^2: ERROR ... nested quantifiers in regex

Replies are listed 'Best First'.
Re^3: ERROR ... nested quantifiers in regex
by AnomalousMonk (Archbishop) on Jul 07, 2011 at 08:19 UTC
    Would you please provide some notations to the code you just posted ...

    I don't have time at the moment, but will try to do so tomorrow.

    ... simple reference that helps understanding regex with all its tricks ...

    Believe me, brother, there ain't no such thing! If there's one thing regular expressions are not, it's simple. (They're also not regular.) The following  perldoc and on-line documentation should be helpful: perlre, perlretut, perlreref, perlfaq6, perlrecharclass, perlrebackslash. Jeffrey Friedl's book is excellent – and priced accordingly: Mastering Regular Expressions. See also the Tutorials section of the Monastery.

Re^3: ERROR ... nested quantifiers in regex
by AnomalousMonk (Archbishop) on Jul 08, 2011 at 18:30 UTC
    Would you please provide some notations to the code you just posted ...

    I have taken a look at the discussions of the  (??{ code }) (5.8 and 5.10+) and  (?PARNO) (5.10+ only) constructs in the Extended Patterns section of perlre and I must say that while they are not ideal for a new learner of regex, they are better than anything I could provide.

    Let me suggest that you (re-)read these sections thoroughly, ponder the replies to your posts above, do some (better yet, lots of) experiments, and then come back to the Monastery and post any remaining or new questions you may have. If you do all this right, you should have lots of questions because regular expressions are very powerful and can be quite subtle. Don't expect to learn it all overnight, but the effort you invest will be well rewarded.

    BTW: If you have any more regex questions, be sure to mention the version of Perl you settle on using.