Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: regex question/mystery

by blazar (Canon)
on Jan 17, 2006 at 18:40 UTC ( #523799=note: print w/replies, xml ) Need Help??


in reply to regex question/mystery

I'm not really sure if I understand what you mean. Of course if "the first half of your expression" matches, then the second one won't. Do you really need that alternation? Wouldn't you better split it in two separate regexen? Alternatively, isn't it that you really want

/^(?:$begin1|$begin2)(\d+)/

instead?

Also, you seem to be familiar with regexen so that I may well be wrong, but your use of dots is somewhat suspect, thus I dare to ask... are you aware that "." matches "any charachter"?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-05-23 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?