Allowing punctuation marks in regular expressions
| From: | Luis Lebron | Date: | Thu, 05 Jun 2003 19:31:05 +0000 |
| Subject: | Allowing punctuation marks in regular expressions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150395@lists.php.net to get a copy of this message | ||
I found the following function to test a string for alphanumeric characters
function is_alphanumeric($string)
{
return (preg_match("/^[a-z0-9]+$/i", $string));
}
How can I modify it so that it also allows punctuation marks?
thanks,
Luis R. Lebron