Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Regex (lookahead) Confusion

by ChrisR (Hermit)
on Feb 06, 2004 at 13:24 UTC ( [id://327057]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex (lookahead) Confusion
in thread Regex (lookahead) Confusion

Thanks. You're right, using the * instead of the + allows the regex to return true if the string is blank. I did want to be sure that string contained at least one of the allowed characters.
$string =~ /^(?:([smtwhfa])(?!.*\1))+$/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-26 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found