I have some (HTML) text in a string and in that text there are several occurences of this “Group” <br><hr/><br>. The simple regex (<br><hr\/><br>) finds the first occurence. What I’m looking for is a way to use preg_replace to replace all of the occurences with another text.
When I use the regex I have with preg_replace, I just get an empty string – with no errors in my log file.
This preg_replace works for me: preg_replace('@(<br><hr\/><br>)@', ' *POST* ', $string);
Test it