Created
April 18, 2012 19:48
-
-
Save danilowm/2416069 to your computer and use it in GitHub Desktop.
Expressão Regular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$feed = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat <image>http://lorempixel.com/100/100/</image>'; | |
// Remover a Tag e o Conteúdo de <image>lalalala</image> | |
$feed = preg_replace( "/\<image\>(.*?)\<\/image\>/s", "", $feed); | |
echo $feed; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment