I have this string in PHP
$content="<a some_text> {pr_start} some_text</a> <a other_text>{pr_stop}</a>
<a some_text> {pr_start} </a> <a some_text> {pr_start} </a>";
I want to replace all the occurrences of the substring
"<a some_text> {pr_start} some_text</a>"
with text "START" and leave the rest as it is!
The result expected is:
"START <a other_text>{pr_stop}</a> START START"
I used
preg_replace('#<a(.*)({pr_start})(.*)</a>#',"START",$content);
Any idea? Thanks!