note 33281 added to function.preg-match-all

From: Date: Fri, 20 Jun 2003 18:31:57 +0000
Subject: note 33281 added to function.preg-match-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-50766@lists.php.net to get a copy of this message
In addition to my previous note, the following expression: preg_match_all('/<([\w]+).* (.*=)(\#(?:[A-F]|[0-9]){6}).*>/i', preg_replace('/"/', '', $template_string), $template_colours_6char); will yield an additional array listing how each colour tag is applied: Array ( ... [2] => Array ( ... [2] => bgColor= [3] => borderColor= ... ) ... ) Replacing (.*=) with (.*color=) will also work fine as long as you don't forget to add the caseless /i at the end of the preg expression. ---- Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33281 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33281&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33281&report=yes

« previous php.notes (#50766) next »