note 78879 deleted from function.strip-tags by ezyang

From: Date: Tue, 05 Aug 2008 16:18:32 +0000
Subject: note 78879 deleted from function.strip-tags by ezyang
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143167@lists.php.net to get a copy of this message
Note Submitter: blackjackdevel at gmail dot com ---- i slightly modified the function of mrmaxxx333 it wouldn't function with href with single cotes , i also removed or modifyed some syntax, but i tested here and it works i had to jump a line so just glue it : $String="<a href='blah.com'>welcome to blah</a>"; $msgStrip = preg_replace('/<a\s+.*?[href=]["|\']([^"\']+)["|\']> {1}([^<]+)<\/a>/is', '\2 (\1)',$String); it will output welcome to blah (blah.com)

« previous php.notes (#143167) next »