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 Quote 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); Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.