One more thing. Instead of replacing the image with text, it may come out cleaner if you make a small png that says "please don't link to images from such-and-such host" and pop it between the image tags. Just make sure it says clearly that this injunction is coming from your site, not from the other end, since the whole point of photobucket and similar is that they
do allow hotlinking.
At the same time you could make the image into an anchor linking to the page where you explain the options. I don't know whether this goes inside or outside the [IMG] tags, but I'm sure you do.
In some RegEx varieties, you can use (?i) and (?-i) to switch case-insensitivity on or off. I have never personally used this, but it can't hurt to try.
Looking again at your example:
$pattern = "/[\[IMG\].?example.?\[/IMG\]]/"
OK, so slashes mean the same thing they do in javascript. Better escape them then. They will occur, because you're using them in your search ("optionally more directories here"). Outside of .htaccess, it's very rare for Regular Expressions to object to things being escaped when they don't need escaping. So if you're in doubt, you can type "\a\-\z" and it will just be read as "a-z".
Do all photobucket links have the exact same format? If so, you can probably reduce grouping and wildcards even more. Just be sure to get your pipes in the right places:
ht
tp://www\.(photobucket\.com\/{exact format of pb link here}|otherunwantedhost\.com\/{exact format of
their link}|thirdhost\.com\/{and another exact format})\.(jpe?g|gif|png)
That is, you can say things like \w+\/\w+ --using the exact number of directories-- instead of having to cover all possibilities with ([^/.]+/)*\w+\.(jpe?g|png|gif). Or, in your case, \/ The first period is exempt from escaping because the brackets themselves already mean "any old character".
Your forums probably have a fixed set of image formats that they recognize, so just list those. jpe?g is shorthand for jpeg|jpg at a savings of three bytes ;)