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

Re^2: Conditional regex

by AnomalousMonk (Canon)
on Feb 17, 2013 at 19:30 UTC ( #1019199=note: print w/ replies, xml ) Need Help??

in reply to Re: Conditional regex
in thread Conditional regex

It does , you just can't have space ... otherwise you couldn't distinguish between some constructs

Further to Anonymonk's point: This is common. Eliminating the extraneous space around  ? in the example below allows this pedestrian regex to compile and work as expected.

>perl -wMstrict -le "print 'match' if 'xxx' =~ m{ ( ? : x ) }xms; " Sequence (? ...) not recognized in regex...

Comment on Re^2: Conditional regex
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-11-26 00:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (694 votes), past polls