[ create a new paste ] login | about

Link: http://codepad.org/YltWm1vA    [ raw code | output | fork ]

PHP, pasted on Sep 10:
1
2
3
4
5
6
<?php

$str = '<br><br><br><br><br><br>Another text here<br>';
echo preg_replace('#(<br\s?/?>){2,}#', '<br><br>', $str );

?>


Output:
1
<br><br>Another text here<br>


Create a new paste based on this one


Comments: