quick question.
I'd like to remove the sup tag from the following string, and all content within it.
$string = "Priority Mail<sup>®</sup> International";
How would I do that?
I imagine something like this would work:
preg_replace("(<([a-z]+)>.*?</\\1>)is","",$input);
$string = preg_replace ("/<sup>(.*?)<\/sup>/i", "", $string);
You should know that (.*?) can't deal with \n or \r, so filter them first.
$string = str_replace("<sup>®</sup>","",$string) or even $string = substr($string,0,13).substr($string,29); and claim it answers the question completely?