Re: check for alphanumeric characters
| From: | John Nichel | Date: | Fri, 29 Apr 2005 15:25:46 +0000 |
| Subject: | Re: check for alphanumeric characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-214211@lists.php.net to get a copy of this message | ||
Diana Castillo wrote:
what kind of a function can I use that will tell me whether a variable is alphanumeric (that is has only characters A-Z or 1-9 )?Something like this should work. (untested) preg_match ( "/^([a-z]||[A-Z]||[0-9])+$/", $string ) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com