I have a statement replacement to do in php (using str_replace
or something else). I have this sentence:
"the sun is yellow when the <wrong>red sun is not yellow</wrong>"
I want this:
"the apple is yellow when the <wrong>red sun is not yellow</wrong>"
So I need to replace a word, except between two specific tags (<wrong
and </wrong>
). How to do that with str_replace
or using a regex?
A little bit harder, isn't it? I've searched for many hours already... No clue... Any idea?
Thanks for solution or clue or help