1--TEST-- 2Bug #41638 (pcre 7.0 regression) 3--FILE-- 4<?php 5$str = "repeater id='loopt' dataSrc=subject columns=2"; 6 7preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead); 8print_r($str_instead); 9 10// these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post) 11preg_match_all("/(['\"])((?:\\\\\\1|.)*)\\1/sU", $str, $str_instead); 12print_r($str_instead); 13 14preg_match_all("/(['\"])(.*)(?<!\\\\)\\1/sU", $str, $str_instead); 15print_r($str_instead); 16 17?> 18--EXPECT-- 19Array 20( 21 [0] => Array 22 ( 23 [0] => 'loopt' 24 ) 25 26 [1] => Array 27 ( 28 [0] => ' 29 ) 30 31 [2] => Array 32 ( 33 [0] => loopt 34 ) 35 36 [3] => Array 37 ( 38 [0] => t 39 ) 40 41 [4] => Array 42 ( 43 [0] => 44 ) 45 46) 47Array 48( 49 [0] => Array 50 ( 51 [0] => 'loopt' 52 ) 53 54 [1] => Array 55 ( 56 [0] => ' 57 ) 58 59 [2] => Array 60 ( 61 [0] => loopt 62 ) 63 64) 65Array 66( 67 [0] => Array 68 ( 69 [0] => 'loopt' 70 ) 71 72 [1] => Array 73 ( 74 [0] => ' 75 ) 76 77 [2] => Array 78 ( 79 [0] => loopt 80 ) 81 82) 83