I need to remove this string if found in my string:
<p><br/> </p>
Cant replace this:
<p><br/>Test. </p>
The whitespace expression I am using wasn't working for that, thank you for your help!
I need to remove this string if found in my string:
<p><br/> </p>
Cant replace this:
<p><br/>Test. </p>
The whitespace expression I am using wasn't working for that, thank you for your help!
Try this:
preg_replace('%<p><br/>\s*</p>%', '', $string);
But what do you mean with Cant replace this ? Should this line also be replaced or not or how?
Update:
To clarify: Do you want to have only whitespaces removed or the whole <p><br/> </p>
?