RE: [PHP] Allowing punctuation marks in regular expressions
| From: | John W. Holmes | Date: | Thu, 05 Jun 2003 23:42:22 +0000 |
| Subject: | RE: [PHP] Allowing punctuation marks in regular expressions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150434@lists.php.net to get a copy of this message | ||
> I tried adding a period to the end but a string will a period still
> returns
> false
>
> function is_alphanumeric($string)
> {
> return (preg_match("/^[A-Za-z0-9.]+$/i", $string));
> }
No it doesn't. It's not allowing spaces, though... Is that the problem?
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/