Re: eregi()

From: Date: Tue, 19 Mar 2002 20:21:40 +0000
Subject: Re: eregi()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89197@lists.php.net to get a copy of this message
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.

« previous php.general (#89197) next »