note 78006 added to function.preg-match-all

From: Date: Sun, 23 Sep 2007 23:15:43 +0000
Subject: note 78006 added to function.preg-match-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-130730@lists.php.net to get a copy of this message
The above example ("Example 1702. Find matching HTML tags") won't give you the expected results if you add to the source text another <b></b> tag at the end. For example having $html="<b>bold text</b><a href=howdy.html>click me</a><b>second bolded</b>"; will result in only one match, instead of three: matched: <b>bold text</b><a href=howdy.html>click me</a><b>bold text</b> part 1: <b> part 2: bold text</b><a href=howdy.html>click me</a><b>bold text part 3: </b> Any ideas how to fix this? ---- Server IP: 69.147.83.197 Probable Submitter: 86.121.150.97 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php Edit -- https://master.php.net/note/edit/78006 Del: integrated -- https://master.php.net/note/delete/78006/integrated Del: useless -- https://master.php.net/note/delete/78006/useless Del: bad code -- https://master.php.net/note/delete/78006/bad+code Del: spam -- https://master.php.net/note/delete/78006/spam Del: non-english -- https://master.php.net/note/delete/78006/non-english Del: in docs -- https://master.php.net/note/delete/78006/in+docs Del: other reasons-- https://master.php.net/note/delete/78006 Reject -- https://master.php.net/note/reject/78006 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130730) next »