ID: 37913 Updated by: [EMAIL PROTECTED] Reported By: tom at foreignproperty dot com -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment:
No, that's perfectly correct. The regx is "/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/". So, [1] correspond to (<([\w]+)[^>]*>), [2] correspond to ([\w]+), [3] correspond to (.*), and [4] correspond to (<\/\\2>). Previous Comments: ------------------------------------------------------------------------ [2006-06-26 08:16:06] tom at foreignproperty dot com Description: ------------ In the description for preg_match_all, in the 2nd example, Find matching HTML tags (greedy), the part 2 and part 3 array values are wrong ($matches[3], $matches[4]). echo "matched: " . $matches[0][$i] . "\n"; echo "part 1: " . $matches[1][$i] . "\n"; >> echo "part 2: " . $matches[3][$i] . "\n"; << >> echo "part 3: " . $matches[4][$i] . "\n\n"; << ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37913&edit=1