note 8029 added to ereg_replace
| From: | jench at ludd dot luth dot se | Date: | Thu, 24 Aug 2000 14:50:17 +0000 |
| Subject: | note 8029 added to ereg_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3080@lists.php.net to get a copy of this message | ||
Hi.
I spent about an hour trying to strip away all characters execept a-z and '-'
Finaly root appears before me, and he showed me how:
$var = ereg_replace("[^a-z0-9\-]", "", $vem)
http://www.php.net/manual/function.ereg-replace.php