Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Subscription Stuff

by BronzeWing (Monk)
on Aug 03, 2002 at 21:40 UTC ( #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? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2023-02-02 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (17 votes). Check out past polls.

    Notices?