preg match question
| From: | phantom | Date: | Sat, 15 Dec 2001 02:20:52 +0000 |
| Subject: | preg match question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-77795@lists.php.net to get a copy of this message | ||
I am passing a string and making sure all the characters in that string are valid.
Example:
For a persons age I am using:
if (!preg_match("/^[0-9]+$/", $Age)) echo "Enter numeric value for age".
But how would I include the following characters as permissible in preg match
~!@#$%^&*()-=_+,.?/\|{}[]
since some of these characters have special meaning in PCRE regrex syntax??