View Single Post
Old 03-19-2008, 03:31 AM   #35 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default What if?

Forgive me if this is a stupid question, but I've been a long time away from regular expressions. If you wanted to check a username and make sure it was all alphanumeric, but didn't start with a number, would the following be right?

/^[a-z]+[a-z\d_]{3,27}$/iD



Edit: er, maybe this would make more sense?
/^[a-z]{1}[a-z\d_]{3,27}$/iD
delayedinsanity is offline  
Reply With Quote