ereg
| From: | C.R. | Date: | Thu, 17 Apr 2003 03:18:36 +0000 |
| Subject: | ereg | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144222@lists.php.net to get a copy of this message | ||
I'm trying to validate a persons name using ereg("^[a-zA-Z[:space:]\\']*$",
$name]). This would allow all alpha characters, spaces, and an apostophe.
The problem I am having is that the output of $name shows something like
O\'Tool, instead of O'Tool. How do I get rid of the slash. Stripslashes
does not work, but I don't think using this is appropriate in this situation
anyway.
Thanks