Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Perl Complains of Nested Quantifiers

by demerphq (Chancellor)
on May 22, 2012 at 21:33 UTC ( #971883=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Perl Complains of Nested Quantifiers
in thread Perl Complains of Nested Quantifiers

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


Comment on Re^3: Perl Complains of Nested Quantifiers
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2015-07-29 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls