ereg_replace help
| From: | Richard Davey | Date: | Thu, 18 Mar 2004 15:21:21 +0000 |
| Subject: | ereg_replace help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-180835@lists.php.net to get a copy of this message | ||
Hi all,
I'm sure this is blindingly simple, but could anyone tell me how to
get an ereg_replace() to return a string where all characters OTHER
than alpha-numerics have been stripped out?
I can do the reverse with:
$output = ereg_replace('[[:alnum:]]', '', $string);
Which will happily remove all alpha-numeric characters from $string!
But I want it to remove anything but.. suggestions please?
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html