Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Makeing rules in Regex for string content and size

by perlcgi (Hermit)
on Jun 05, 2000 at 14:20 UTC ( #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? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-05 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?