|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: stuck on regexpby moxliukas (Curate) |
| on Aug 25, 2002 at 11:02 UTC ( #192659=note: print w/ replies, xml ) | Need Help?? |
|
Well, FreeBSD 'adduser' IIRC displays the regexp that the username must conform to, but I am not at my FreeBSD box now so I can't check that, however here is my stab at a regexp you might need:
This will force the first character to be a-z or A-Z and any other character a-z, A-Z, 0-9, -, . or _. It will also force the login name to be at least 2 characters (I'm not sure if this is what you want) and reject a username made up entirely of numbers (as the first character must be a-z or A-Z) Hope this helps.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||