Gilby,
If you want to try out the new function to strip the bbcode, replace your existing one with this.
You can be the guinea pig and take all the flack from the usenet users if it goes wrong

No, but seriously, I'd appreciate some help in testing it. It's getting a bit boring posting test messages to myself
Code:
sub remove_bb_code {
my $text = $_[0];
my ($bbo,$bbc);
$text =~ s/&/&/ig;
$text =~ s/\[size=[0-9]+\]|\[\/size\]//ig;
$text =~ s/\[color=(\"\#)?[A-Za-z0-9]+(\")?\]|\[\/color\]//ig;
$text =~ s/\[url=(\")?//ig; $text =~ s/(\")?\](.)+\[\/url\]//gi;
$text =~ s/\[email=(\")?//ig; $text =~ s/(\")?\](.)+\[\/email\]//gi;
$text =~ s/\[font=(\"\#)?[A-Za-z]+(\")?\]|\[\/font\]//ig;
$text =~ s/\[list(=)?[1Aa]?\]|\[\/list(=)?[1Aa]?\]//ig;
$text =~ s/\[\*\]/ - /ig;
$text =~ s/\[(\/)?code\]//ig;
my $bbcodes = db_fetch("SELECT bbcodetag FROM bbcode");
while (my $bbcode = $bbcodes->fetchrow_array) {
$bbo=quotemeta("[".$bbcode."]");
$bbc=quotemeta("[/".$bbcode."]");
$text =~ s/$bbo|$bbc//gi;
}
return $text;
}