note 10528 modified in ereg_replace by zak
| From: | zak@php.net | Date: | Wed, 10 Jan 2001 09:02:24 +0000 |
| Subject: | note 10528 modified in ereg_replace by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9538@lists.php.net to get a copy of this message | ||
[Editor's Note: The carat character has special meaning within a regular expression - it
indicates the start of a string.]
For those who, just like me, have been reading through the above and thought: 'yeah
right', here is a little clue on the difference between ereg_replace and str_replace.
ereg_replace can not be used in the following way and str_replace can:
<pre>
$intovar = ereg_replace("^", " ", $outofvar);
The return will be just the same. Strange, because it is said to be binary save.
The following can be used for all reading-characters (I hope)(.,:;!@#$%^&*()_+, etc)
$intovar = str_replace("^", " ", $outofvar);
</pre>
Mark.
http://www.php.net/manual/function.ereg-replace.php