joshis Posted August 11, 2010 Share Posted August 11, 2010 Need Regular Expression help Hi, I want to remove all string stating with "<p class='fb-like'><iframe" and ending with "</iframe></p>" from a long html string. It may contain more than one such expressions. Any help is greatly appretiated. Thanks Arun Link to comment https://forums.phpfreaks.com/topic/210434-remove-contents-starting-with-p-tag/ Share on other sites More sharing options...
JAY6390 Posted August 11, 2010 Share Posted August 11, 2010 $output = preg_replace('~<p class=\'fb-like\'><iframe.*?</iframe></p>~sim', '', $input); Link to comment https://forums.phpfreaks.com/topic/210434-remove-contents-starting-with-p-tag/#findComment-1098045 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.