Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Greedy regexp matching: differences between man page and implementation?

by perldeveloper (Scribe)
on Jul 08, 2004 at 13:47 UTC ( [id://372796]=note: print w/replies, xml ) Need Help??


in reply to Re: Greedy regexp matching: differences between man page and implementation?
in thread Greedy regexp matching: differences between man page and implementation?

This is an even more obvious:
$_='abcdefgh'; /^(a|abcdefg)(h|bc)/; print "[$1] [$2]\n";
It prints [a] [bc]. The regexp engine clearly doesn't run through all possible combinations within (..|..|..) patterns.

Log In?
Username:
Password:

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

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

    No recent polls found