Vlad Kulchitski wrote:
> 
> Hi,
> 
> Can any1 send a small script of how to valiade a username using eregi().
> 
> I want username to consist only a-zA-Z1-0, "_", and "-"
> 
> I can't get it to work correctly

$pattern = "[a-zA-Z0-9_\-]+";
this is meaning :
One word containing a-z or A-Z or 0-9 or "_" or "-" with a length of
minimum 1 character !

Regular expression is not so difficult !
Check the php documentation !
http://www.php.net/manual/en/ref.regex.php

R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to