|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Subscription Stuffby Zaxo (Archbishop) |
| on Aug 03, 2002 at 13:18 UTC ( [id://187359]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
You want to match at least one, so use '+' instead of '*' as the quantifier. Having passed that, you want to match a non-digit:
A different quantifier may be used if you want a minimum length, like /^\w{4,}$/ Update: Modified code to untaint the sub's argument, instead of checking a copy. If you don't like side effects use the commented-out version. After Compline,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||