Annotation of embedaddon/php/ext/pcre/tests/bug41638.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #41638 (pcre 7.0 regression)
! 3: --FILE--
! 4: <?php
! 5: $str = "repeater id='loopt' dataSrc=subject colums=2";
! 6:
! 7: preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead);
! 8: print_r($str_instead);
! 9:
! 10: // these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post)
! 11: preg_match_all("/(['\"])((?:\\\\\\1|.)*)\\1/sU", $str, $str_instead);
! 12: print_r($str_instead);
! 13:
! 14: preg_match_all("/(['\"])(.*)(?<!\\\\)\\1/sU", $str, $str_instead);
! 15: print_r($str_instead);
! 16:
! 17: ?>
! 18: --EXPECT--
! 19: Array
! 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: )
! 47: Array
! 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: )
! 65: Array
! 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: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>