ereg
| From: | Michael Hall | Date: | Sun, 01 Apr 2001 03:37:56 +0000 |
| Subject: | ereg | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-46490@lists.php.net to get a copy of this message | ||
I'm using the following expression to check input strings:
if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! }
This works fine except for when a string has spaces, as in text. What do I
need to add to the expression to handle spaces (internal, not at the
beginning or end).
Thanks
Mick