note 31794 added to function.eregi-replace

From: Date: Sun, 04 May 2003 00:23:29 +0000
Subject: note 31794 added to function.eregi-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-47481@lists.php.net to get a copy of this message
/*As php at silisoftware dot com's example works only if there is not more than one link in $string, I rewrote his expression to function with strings containing multiple links: */ function AHREF2text($string) { return eregi_replace('(<a [^<]*href=["|\']?([^ "\']*)["|\']?[^>]*>([^<]*)</a>)','[\\3] (link: \\2)', $string); } -- http://www.php.net/manual/en/function.eregi-replace.php http://master.php.net/manage/user-notes.php?action=edit+31794 http://master.php.net/manage/user-notes.php?action=delete+31794 http://master.php.net/manage/user-notes.php?action=reject+31794

« previous php.notes (#47481) next »