[ create a new paste ] login | about

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

PHP, pasted on Apr 4:
1
2
3
4
5
<?php

$str = "<br><br     >    <br><br>Test<br     ><br>";

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


Output:
1
<br>Test<br>


Create a new paste based on this one


Comments: