Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Subscription Stuff

by BronzeWing (Monk)
on Aug 03, 2002 at 21:40 UTC ( [id://187405]=note: print w/replies, xml ) Need Help??


in reply to Subscription Stuff

I felt an itch to try to do this in one regex. Admittedly it's a longer string than checking with two short ones, but here's a single regex that I believe does the same thing:

m/^[\w-]*[A-Z\-\_][\w-]*$/i

Basically, "There must be a single character that is a letter, a dash, or an underscore. It can also have any number of characters before or after it if none of those characters are anything but word characters (letters or underscores) or dashes."

-BronzeWing

Log In?
Username:
Password:

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

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

    No recent polls found