edit:
the code i posted below didnt actually work properly, it would lose some contents of the <li>'s so i made it to use a callback.
see how this works out...
<?php
$s = "<br /><br />this is a nice string<br /><br />new line...<ul><br /><li>this is a list item</li><br /><li>which has br tags</li><br /></ul> because it just does.";
echo $s . "\n";
$s = preg_replace_callback('/<ul>(.*?<br \/>.*?)+<\/ul>/i', "replace_cb", $s);
echo $s;
function replace_cb($matches)
{
return str_replace('<br />', '', $matches[0]);
}
?>
my output is
<br /><br />this is a nice string<br /><br />new line...<ul><br /><li>this is a list item</li><br /><li>which has br tags</li><br /></ul> because it just does.
<br /><br />this is a nice string<br /><br />new line...<ul><li>this is a list item</li><li>which has br tags</li></ul> because it just does.