Should be: $results = preg_replace("@<(tag|tag2)(.*?)>.*?</\\1>@sm","",$html);
Remember you need to find the matching tag, so use backreference.
Burhan Khalid wrote:
Hello dwalker,
Thursday, April 24, 2003, 11:50:16 PM, you wrote:
Firstly, don't ask for reading confirmation reciepts -- especially on a list.
d> What is the most efficient method of removing tags AND the contents between the tags?
$results = preg_replace("@<(tag|tag2)(.*?)>.*?</(tag|tag2)>@sm","",$html);
were tag|tag2 is the list of tags you want to search for.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php