$str = "I<br><br><br><br><br>love<br><br><br><br>you";
echo preg_replace("/(<br\s*\/>\s*)+/", "<br />", $str);

 

댓글 0