Welcome to the Monastery | |
PerlMonks |
stuck on regexpby jimbobn (Novice) |
on Aug 25, 2002 at 10:50 UTC ( [id://192656]=perlquestion: print w/replies, xml ) | Need Help?? |
jimbobn has asked for the wisdom of the Perl Monks concerning the following question:
Hi All I have a field that needs to be checked for validity. It can only contain a-z A-Z 0-9 . _ - But . _ - characters cannot be at the begining of the field, and the field can not be just 0-9 or contain 0-9 as the first character i.e: OK: billy.bob billy_bob billy-bob billybob BILLYBOB BillyBob Billy2Bob BillyBob2 NOT OK: ______ _billybob 1billybob 1111 billy^bob Basicaly, i need to check a name is vaild before passing it over to the unix command 'useradd'. I have had a go at it myself and looked at some of the tutorials, but no suck luck :-( Thanks
Back to
Seekers of Perl Wisdom
|
|