|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Invité de passage
![]() Inscription : mai 2011 Messages : 28 ![]() |
Bonjour a tous,
depuis mon poste d'hier et avec l'aide de ABCIWEB, je decouvre la fonction preg_replace. J'ai une question. Imaginons que j'ai ce code: Code :
<iframe frameborder="0" width="480" height="269" src="http://www.dailymotion.com/embed/video/xirv9v"></iframe><br /><a href="http://www.dailymotion.com/video/xirv9v_catherine-ringer-pardon_music" target="_blank">Catherine Ringer - Pardon</a> <i>par <a href="http://www.dailymotion.com/catherineringer" target="_blank">catherineringer</a></i> Je voudrais savoir comment supprimer tout apres le </iframe> J'ai essaye Code :
$nettoyage = preg_replace('#</iframe>(.*)\>#','',$coco); Mais j'obtiens ceci: Code :
<iframe frameborder="0" width="480" height="269" src="http://www.dailymotion.com/embed/video/xirv9v"> |
|
|
00
|
|
|
#2 |
![]() ![]() Inscription : septembre 2010 Messages : 7 103 ![]() |
pas besoin de regexp pour ça, strpos + substr suffisent
__________________
http://blog.stealth35.com/ |
|
|
00
|
|
|
#3 | ||
|
Invité de passage
![]() Inscription : mai 2011 Messages : 28 ![]() |
Code :
Merci encore
|
||
|
|
00
|
Copyright © 2000-2012 - www.developpez.com