php and replace vs. perl $data=~ s/<BR>\n//;
| From: | Jani Ollikainen | Date: | Sun, 18 Jun 2000 21:17:42 +0000 |
| Subject: | php and replace vs. perl $data=~ s/<BR>\n//; | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21696@lists.php.net to get a copy of this message | ||
I've been wondering is there a replace function which does not
replace all matches? If there is, some one could point me out
which is it. If not, i think there should be one.
Even preg_replace knows only /e modifier, no /g like in perl.
And first i tought that this is covered in todo:
* have a non-greedy option for preg_replace().
but, then i heard that, that hasn't anything to do with
that situation. I'm not so expert in regexp, but now i
know what non-greedy means and what i wanted isn't it.
ps. i'm not on the list so cc me.
--
-----------------------------------------
bestis bestis@iname.com
Jani Ollikainen http://come.to/bestis
-----------------------------------------