Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Regular Expression - delimiter/spaces problem

by shmem (Canon)
on Feb 15, 2014 at 14:59 UTC ( #1075050=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Regular Expression - delimiter/spaces problem
in thread Regular Expression - delimiter/spaces problem

Why are using (?:)?

The "?:" reduces the parens effect to grouping. That means, the content of the parens will not be captured to populate a $< digit> variable ($1, $2, $3, ...). It is good practice to state exactly what is meant; and if you want to just group alternatives, then (?:) is the fitting expression.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'


Comment on Re^3: Regular Expression - delimiter/spaces problem

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2015-07-07 20:30 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 (93 votes), past polls