I'm trying to match/replace all instances of the "br" tag, but only when they're surrounded by the {c} {/c} delimiters. This is the regex pattern I have right now:
/{c}.*(<br>).*{\/c}/mgsU
The problem with what I have currently is that it only matches the very first tag, and ignores the rest, unless there's another {c}{/c} block, where it does the same thing. This is the url to a regex101 page that I've created for testing purposes: https://regex101.com/r/eVI53z/2
It has a test string, and my desired output would be matching lines 2,3,end of 5, beginning of 6 before the {/c} tag, end of line 12, the three tags on line 15, and middle of line 16.
Any help would be greatly appreciated. Thanks, guys!
try this: