Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: Regular expression help

by beeconn66 (Novice)
on Aug 18, 2005 at 18:08 UTC ( #484899=note: print w/replies, xml ) Need Help??

in reply to Re: Regular expression help
in thread Regular expression help I overcame that hurdle thanks to you guys...but now i need to find where a pattern match fails. Is it possible? For instance if i'm looking for digts and the string is 123a45 is there a way to inform the user that the pattern match is failing because of the "a"?

Replies are listed 'Best First'.
Re^3: Regular expression help
by admiral_grinder (Pilgrim) on Aug 18, 2005 at 18:50 UTC
    you can match with m/\d+/ and if that fails you can tell the user "string contains none numerical digit" or something like that.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2021-01-20 20:50 GMT
Find Nodes?
    Voting Booth?