Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl Complains of Nested Quantifiers

by ikegami (Patriarch)
on May 22, 2012 at 16:39 UTC ( [id://971828]=note: print w/replies, xml ) Need Help??


in reply to Perl Complains of Nested Quantifiers

You must be using a version of Perl before this feature was added (5.10 IIRC).

If so, you're using an ancient version of Perl. 5.8, 5.10 and now 5.12 have all been end-of-lifed. 5.14 is still supported, and 5.16.0 is the latest stable version.

  • Comment on Re: Perl Complains of Nested Quantifiers

Replies are listed 'Best First'.
Re^2: Perl Complains of Nested Quantifiers
by sunmaz (Novice) on May 22, 2012 at 17:11 UTC

    Thanks. That clarifies things. Unfortunately, I am stuck using this ancient version due to various reasons.

    Thanks everyone for all of your assistance in this matter.

      FWIW the "possessive modifier" is simply syntactic sugar for (?>...) so (?>x+) should produce exactly the same optree as x++.

      $ perl -Mre=debug -e'/x++/' Compiling REx "x++" Final program: 1: SUSPEND (8) 3: PLUS (6) 4: EXACT <x> (0) 6: SUCCEED (0) 7: TAIL (8) 8: END (0) anchored "x" at 0 (checking anchored) minlen 1 Freeing REx: "x++" $ perl -Mre=debug -e'/(?>x+)/' Compiling REx "(?>x+)" Final program: 1: SUSPEND (8) 3: PLUS (6) 4: EXACT <x> (0) 6: SUCCEED (0) 7: TAIL (8) 8: END (0) anchored "x" at 0 (checking anchored) minlen 1 Freeing REx: "(?>x+)"

      so there is nothing stopping you using it in 5.8.8

      ---
      $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://971828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-23 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found