MR Happy, you need to examine the speed of your code, your running preg repalce lots of times when you only need to run it once

PHP Code: 
preg_replace("/(\[[RS|HF|FS|MU]\])?/","",$string); //UNTESTED 
or you cauld possibly do something like

PHP Code: 
preg_replace("/^(\[A-Z{2}\])/","",$string); 
what this is doing is its only looking at the start of the line for the brace and if it finds an open brace it then looks for 2 letters that are upper-case, and that is followed by a closing brace. these are very strict characteristics of host prefixing rules.

if your worried about tags that have lower case then you could poss just add a i after the last slash in the compilation to make it case Insensitive.