By jove, I think I've got it
ubb_lib is this:
$_[0] =~ s/n?r?([*])(.+?)([/*])/<li>$2</li>/isg;
and lib_posting is this:
$_[0] =~ s/(<li>)(.+?)(</li>)/[*]$2[/*]/isg;
It creates lists correctly
and validates...
This works if you aren't making a full list
[*] test