I'm trying to combine trimming of <br>
or <br />
, whitespaces and
's from the start and end of a string.
There are a few similar questions (here and here), but I couldn't get all 3 working in PHP.
Currently I have this; #(^( |\s)+|( |\s)+$)#
needing combining with this: /(^)?(<br\s*\/?>\s*)+$/
but have no idea how to accomplish it. I'm using a PHP preg_replace.
Any help would be great, thanks.