|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-11 09:52 UTC] kerry at lothrop dot de
[2002-04-09 17:01 UTC] jimw@php.net
[2003-01-20 17:24 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
A short example : $newsitem = preg_replace('/(<([a-zA-Z-]+) ([^>]*)analyze="[0-9]*"([^>]*)>)(.*?)(<\/\\2>)/mse', "'\\1'.transformNewsitemPart('\\5').'\\6'", $newsitem); where I transform the text between any html tag with "analyze" attribute. The problem is that the preg_replace function with e modifier adds backslashes before any " in the matched text (\\5) BEFORE the function transformNewsitemPart is interpreted. The behaviour is new in php 4.0.4. It was not present in php 4.0.3.