note 28932 added to pcre.pattern.modifiers

From: Date: Tue, 28 Jan 2003 13:03:48 +0000
Subject: note 28932 added to pcre.pattern.modifiers
Groups: php.notes 
Request: Send a blank email to php-notes+get-42923@lists.php.net to get a copy of this message
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); -- http://www.php.net/manual/en/pcre.pattern.modifiers.php http://master.php.net/manage/user-notes.php?action=edit+28932 http://master.php.net/manage/user-notes.php?action=delete+28932 http://master.php.net/manage/user-notes.php?action=reject+28932

« previous php.notes (#42923) next »