I am trying to use preg_replace to convert <br> or <br /> to a carriage return ( ). My problem seems to be that it either doesn’t find the <br>‘s or doesn’t recognize the hex code I’m trying to pass in. Here is my relevant PHP:
preg_replace('`<br(?: /)?>(\x{13}/u)`', '$1', $content);
Other Information: The strings I am passing in have " but I don’t think that will interfere with preg_replace().
Here are a couple links that have helped me get this far:
http://www.webmasterworld.com/forum21/10973.htm (use carriage return instead of \n in tooltips)
https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php#58409 (use \x{13} instead of 
)
Hmmm, You seem to have preg_replace formatted a little strange. Not sure why your doing it with the backreferences like that? For something simple like this, the First variable should be the regex. 2nd should be replacement, and third should be subject:
I think that will work, but I am not great at regexes. .*? should match any characters up to the next >