Re: preg_match_all but no preg_replace_all?
| From: | Luke Davison | Date: | Tue, 10 Aug 2004 17:14:50 +0000 |
| Subject: | Re: preg_match_all but no preg_replace_all? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-193329@lists.php.net to get a copy of this message | ||
> I want to be sure, that preg_replace replaces all matches. But it
> doesn't accept the /g modifier. And anyhow, there's no preg_replace_all
> like there is an preg_match_all. Will preg_replace replace everything by
> default?
from php.net:
mixed preg_replace ( mixed pattern, mixed replacement, mixed subject
[, int limit])
Searches subject for matches to pattern and replaces them with
replacement. If limit is specified, then only limit matches will be
replaced; if limit is omitted or is -1, then all matches are replaced.