I would like a regular expression in PHP to find all HTML entities such as "<br /> <br /> ..etc. "
in order to remove them from a long string.
This one removes alpha, decimal and hex HTML entities:
$text = preg_replace('/&(?:[a-z\d]+|#\d+|#x[a-f\d]+);/i', '', $text);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With