preg_replace does not seem to agree with '\\'.
Below seems to work with ereg_replace.
<?php
$pat = "[*+;\\-]";
$rep = " ";
echo ereg_replace($pat,$rep,$string);
?>
-Stewart
~
-----Original Message-----
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 23:37
To: [EMAIL PROTECTED]
Subject: [PHP] still not friends with RegExps..
Hello,
Maybe RegExps are still my point of weakness...but I still like them as much
as I like the Self-Reference phrases...
Okay now, how can i replace all the matches of "\" , "*", "+", "-" and ";"
with an empty string by calling once the preg_replace() or str_replace() or
any string replace function? ("")
Do i have to call it as many times as i got different replacments?
-elias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]