Re: Check for characters other than letters and numbers (for username)
| From: | Jeff Warrington | Date: | Sat, 06 Jan 2001 01:08:15 +0000 |
| Subject: | Re: Check for characters other than letters and numbers (for username) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32988@lists.php.net to get a copy of this message | ||
In article <92toje$paf$1@toye.p.sourceforge.net>, "Noah Spitzer-Williams"
<noahsw@cyberdude.com> wrote:
You can use the POSIX regex syntax as well as the following:
ereg("[a-zA-Z0-9]+",$string)
or
ereg("[[:alpha:][:digit:]]+",$string)
or
ereg("[[:alnum:]]+",$string)
Jeff
> is there a simple function to check for characters other than letters
> and numbers? i'd like to verify a username is valid when they register.
>
> thanks!
>
> - noah
>
>
>
>