note 28932 rejected from pcre.pattern.modifiers by didou
| From: | didou@php.net | Date: | Fri, 26 Sep 2003 11:00:32 +0000 |
| Subject: | note 28932 rejected from pcre.pattern.modifiers by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57166@lists.php.net to get a copy of this message | ||
Note Submitter: carl at thep lu se
----
Since /g is always on and there is no documented way to turn it off (this is really annoying, BTW,
since /g really isn't needed all that often anyway), you may find yourself having to do this:
$str = preg_replace('/^(.*)pattern(.*)$/', '$1replacement$2', $str);