Some regex example
Check Email format
^[a-z]+[0-9a-z._-]*@[0-9a-z.]+[a-z]$
will match pank@test.com, henry.pan@test.com, a_pank@test.com
but not 1pank@test.com, pank#@test.com, %pank@test.com
Check unix userid
^[a-z][a-z_-]*
will match pank, pan_, pank-
but not 1pank, pank#, pank!
Posted by pank at August 11, 2004 06:15 PM