Hi,
I was wondering if someone might be able to give me a little reg ex advice. I'm simply replacing [begin_underline] and [end_underline] with <u> and </u> as well as backreferencing the content in between them. Here's what I tried:
$string=preg_replace("[begin_underline]([[end_underline]]+)[end_underline]\","<u>$1</u>",$string);
The reason this doesn't work is because the [[end_underline]]+ part doesn't work because it uses all of the letters in this for negation. Thus what I want to do for this part is "match anything not [end_underline], but what it's doing is "matching anything not e, not n, not d, not _, not u, not n, etc, etc ".
Thanks for any advice🙂