ereg is failing on this simple test
| From: | Manuel Ochoa | Date: | Sat, 13 Dec 2003 03:54:16 +0000 |
| Subject: | ereg is failing on this simple test | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172625@lists.php.net to get a copy of this message | ||
Why is this test failing?
$data = "A Simple test.";
If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
echo "Valid text";
}
else {
echo "Not valid text";
}
I'm running PHP 4.34 on a windows pc. This function is new to me, any help would be
appreciated.