Wednesday, 13 November 2019

Regex

Menghilangkan semua tag <br> atau <br/> di akhir kalimat.

$html = "Hello World <br>  <br> </br>";
echo preg_replace('#(<br */?>[^a-zA-Z1-2]*\s*){1,}$#i', '', $html));

No comments:

Post a Comment