Replace a number of imprecise str_replaces with a pretty cool preg_replace.