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

Re: Regex Validation

by ikegami (Patriarch)
on Jul 30, 2009 at 03:22 UTC ( [id://784458]=note: print w/replies, xml ) Need Help??


in reply to Regex Validation

Readable solution, but scans entire string:

if (grep $_!=2, map length, /(:+)/g) { die }

Stops at first error:

if (/: (?: :: | (?<!::)(?!:) )/x) { die }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-26 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found