Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Understanding regular expressions: why do I have to use map to clear up undefs in regex output?

by jwkrahn (Abbot)
on Jun 19, 2009 at 22:15 UTC ( [id://773143]=note: print w/replies, xml ) Need Help??


in reply to Understanding regular expressions: why do I have to use map to clear up undefs in regex output?

I would like to know what it is about my pattern that creates all those undefs

Your pattern   (\d+) | (?:"(.+?)") has two groups of capturing parentheses so when one group matches the other returns undef and vice-versa.

  • Comment on Re: Understanding regular expressions: why do I have to use map to clear up undefs in regex output?
  • Select or Download Code

Log In?
Username:
Password:

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

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

    No recent polls found