Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Makeing rules in Regex for string content and size

by perlcgi (Hermit)
on Jun 05, 2000 at 14:20 UTC ( [id://16377]=note: print w/replies, xml ) Need Help??


in reply to Makeing rules in Regex for string content and size

A slightly shorter version of corion's nice explanation above would be:
 /^[\w ,"&-']{4,16}$/ Updated: Caveat - This will also allow underscores which is probably not what you want. Kudos to corion

Replies are listed 'Best First'.
RE: Re: Makeing rules in Regex for string content and size
by gaspodethewonderdog (Monk) on Jun 06, 2000 at 17:45 UTC
    then why not just do: /^A-Z0-9 ,"&-'{4,16}$/i in the first place
RE: Re: Makeing rules in Regex for string content and size
by gaspodethewonderdog (Monk) on Jun 06, 2000 at 17:46 UTC
    then why not just do: /^[A-Z0-9 ,"&\-']{4,16}$/i in the first place

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found