ereg problem
| From: | Janet Valade | Date: | Wed, 14 Feb 2001 18:20:39 +0000 |
| Subject: | ereg problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39703@lists.php.net to get a copy of this message | ||
I am using the following statement to check phone numbers.
if (!ereg("^[0-9\-\+\.\ \)\(]{10,}$",$value)) {
Can anyone tell me why this works for every character except the -. It
doesn't see the hyphen as a valid part of the phone number, even though it
recognizes the other characters, e.g. + or .
Janet