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!
Here you go:
preg_replace('!<br/>\s+</p>!', '<br/></p>', $variable_name);
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>
?
精彩评论