Re[2]: [PHP] ereg_replace help
| From: | Richard Davey | Date: | Thu, 18 Mar 2004 15:49:00 +0000 |
| Subject: | Re[2]: [PHP] ereg_replace help | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180844@lists.php.net to get a copy of this message | ||
Hello Chris,
Thursday, March 18, 2004, 3:28:01 PM, you wrote:
CH> did you try
CH> $output = ereg_replace('[^[:alnum:]]', '', $string);
CH> ?
Nope, because in the only reference book I had to hand it said the ^
matched the start of a string so it didn't occur to me to try it.
Thanks to John I now know when used in a block it's no longer limited
to the start of the string. The code you posted above works, thanks.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html