scrub document of BBcode
问题 Say I have a document like: [b]blah[/b] [img]Thisismyimage.png[/img] How can I make it so that I completely remove all of the BBcode tags. And also remove all the text from between the [img] tags. If it helps at all I am using an IPB board. If any knows of a way to easily to parse the BBcode that would be great, however, I am perfectly happy with just removing it. 回答1: Parsing BBcode is pretty much a solved task: http://pear.php.net/package/HTML_BBCodeParser - And that would also be the more