Hello World & amp; lt; imgtitle & quot; Hello World & quot; alt & quot; Hello World & quot; & amp; gt, how to replace it with your & amp; lt; a & amp; gt; haoshi & amp; lt; a & amp; gt; field & amp; lt; imgtitle & quot; & quot; alt & quot; & quot; & amp; gt; The requirement is that the keyword is not in the tag attribute... hello World
How can I replace this text with a regular expression function in php?
You
Good world
The requirement is that the tag is not added to the tag attribute of the keyword. Add all other labels.
Reply content:
Hello World
How can I replace this text with a regular expression function in php?
YouGood world
The requirement is that the tag is not added to the tag attribute of the keyword. Add all other labels.
$ Subject = 'Hello world'; $ pattern = "/(good world )(?! [^ \ '\ "> <] * [\' \"])/"; $ Result = preg_replace ($ pattern," $1 ", $ subject ); echo $ result;