diff --git a/RunTest b/RunTest index e80f406..1c0b3c5 100755 --- a/RunTest +++ b/RunTest @@ -51,8 +51,8 @@ title1="Test 1: Main functionality (Compatible with Perl >= 5.10)" title2="Test 2: API, errors, internals, and non-Perl stuff" title3="Test 3: Locale-specific features" -#title4A="Test 4: UTF" -#title4B=" support (Compatible with Perl >= 5.10)" +title4A="Test 4: UTF" +title4B=" and Unicode property support (Compatible with Perl >= 5.10)" #title5="Test 5: API, internals, and non-Perl stuff for UTF" #title6="Test 6: Unicode property support (Compatible with Perl >= 5.10)" #title7="Test 7: API, internals, and non-Perl stuff for Unicode property support" @@ -82,7 +82,7 @@ if [ $# -eq 1 -a "$1" = "list" ]; then echo $title1 echo $title2 "(not UTF)" echo $title3 -# echo $title4A $title4B + echo $title4A $title4B # echo $title5 support # echo $title6 # echo $title7 @@ -175,7 +175,7 @@ unset cp ls mv rm do1=no do2=no do3=no -#do4=no +do4=no #do5=no #do6=no #do7=no @@ -204,7 +204,7 @@ while [ $# -gt 0 ] ; do 1) do1=yes;; 2) do2=yes;; 3) do3=yes;; -# 4) do4=yes;; + 4) do4=yes;; # 5) do5=yes;; # 6) do6=yes;; # 7) do7=yes;; @@ -346,9 +346,9 @@ fi # If no specific tests were requested, select all. Those that are not # relevant will be automatically skipped. -if [ $do1 = no -a $do2 = no -a $do3 = no ]; then -# -a $do4 = no -a \ -# $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ +if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no \ + ]; then +# -a $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ # $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \ # $do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \ # $do17 = no -a $do18 = no -a $do19 = no -a $do20 = no -a \ @@ -358,7 +358,7 @@ if [ $do1 = no -a $do2 = no -a $do3 = no ]; then do1=yes do2=yes do3=yes -# do4=yes + do4=yes # do5=yes # do6=yes # do7=yes @@ -405,7 +405,7 @@ for bmode in "$test8" "$test16" "$test32"; do *) bits=8; echo "---- Testing 8-bit library ----"; echo "";; esac -# Primary test, compatible with JIT and all versions of Perl >= 5.8 +# Primary non-UTF test, compatible with JIT and all versions of Perl >= 5.8 if [ $do1 = yes ] ; then echo $title1 @@ -516,28 +516,27 @@ if [ $do3 = yes ] ; then fi fi -## Additional tests for UTF support -# -#if [ $do4 = yes ] ; then -# echo ${title4A}-${bits}${title4B} -# if [ $utf -eq 0 ] ; then -# echo " Skipped because UTF-$bits support is not available" -# else -# for opt in "" "-s" $jitopt; do -# $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput4 testtry -# if [ $? = 0 ] ; then -# $cf $testdata/testoutput4 testtry -# if [ $? != 0 ] ; then exit 1; fi -# else exit 1 -# fi -# if [ "$opt" = "-s" ] ; then echo " OK with study" -# elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study" -# else echo " OK" -# fi -# done -# fi -#fi -# +# Tests for UTF and Unicode property support + +if [ $do4 = yes ] ; then + echo ${title4A}-${bits}${title4B} + if [ $utf -eq 0 ] ; then + echo " Skipped because UTF-$bits support is not available" + else + for opt in "" $jitopt; do + $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput4 testtry + if [ $? = 0 ] ; then + $cf $testdata/testoutput4 testtry + if [ $? != 0 ] ; then exit 1; fi + else exit 1 + fi + if [ "$opt" = "-jit" ] ; then echo " OK with JIT" + else echo " OK" + fi + done + fi +fi + #if [ $do5 = yes ] ; then # echo ${title5}-${bits} support # if [ $utf -eq 0 ] ; then diff --git a/perltest.pl b/perltest.pl index 7e37c44..667165a 100755 --- a/perltest.pl +++ b/perltest.pl @@ -109,9 +109,9 @@ for (;;) $mod =~ s/mark,?//; - # "ucp" asks pcre2test to set PCRE_UCP; change this to /u for Perl + # "ucp" asks pcre2test to set PCRE2_UCP; change this to /u for Perl - $mod =~ s/W(?=[a-zA-Z]*$)/u/; + $mod =~ s/ucp,?/u/; # Remove "no_auto_possess" and "no_start_optimize" (disable PCRE2 optimizations) diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index dba33ea..f82b8ac 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -2608,7 +2608,7 @@ names. Arguments: ptr pointer to the initial [ - endptr where to return the end pointer + endptr where to return a pointer to the terminating ':', '.', or '=' Returns: TRUE or FALSE */ @@ -3988,13 +3988,13 @@ for (;; ptr++) CONTINUE_CLASS: c = *(++ptr); - if (c == CHAR_RIGHT_SQUARE_BRACKET && !inescq) break; if (c == 0 && nestptr != NULL) { ptr = nestptr; nestptr = NULL; - c = *(++ptr); + c = *(++ptr); } + if (c == CHAR_RIGHT_SQUARE_BRACKET && !inescq) break; } /* End of main class-processing loop */ /* We will need an XCLASS if data has been placed in class_uchardata. In diff --git a/src/pcre2_study.c b/src/pcre2_study.c index 672f695..c702d00 100644 --- a/src/pcre2_study.c +++ b/src/pcre2_study.c @@ -1265,7 +1265,7 @@ do XCLASS would not have been created. This means that code points >= 255 are always potential starters. */ -#ifdef SUPPORT_WIDE_CHARACTERS +#ifdef SUPPORT_WIDE_CHARS case OP_XCLASS: if ((tcode[1 + LINK_SIZE] & XCL_HASPROP) != 0 || (tcode[1 + LINK_SIZE] & (XCL_MAP|XCL_NOT)) == XCL_NOT) diff --git a/testdata/testinput4 b/testdata/testinput4 new file mode 100644 index 0000000..d4b6075 --- /dev/null +++ b/testdata/testinput4 @@ -0,0 +1,2212 @@ +# This set of tests is for UTF support, including Unicode properties. The +# Unicode tests are all compatible with all versions of Perl >= 5.10, but +# some of the property tests may differ because of different versions of +# Unicode in use by PCRE2 and Perl. + +#perltest + +/a.b/utf + acb + a\x7fb + a\x{100}b + *** Failers + a\nb + +/a(.{3})b/utf + a\x{4000}xyb + a\x{4000}\x7fyb + a\x{4000}\x{100}yb + *** Failers + a\x{4000}b + ac\ncb + +/a(.*?)(.)/ + a\xc0\x88b + +/a(.*?)(.)/utf + a\x{100}b + +/a(.*)(.)/ + a\xc0\x88b + +/a(.*)(.)/utf + a\x{100}b + +/a(.)(.)/ + a\xc0\x92bcd + +/a(.)(.)/utf + a\x{240}bcd + +/a(.?)(.)/ + a\xc0\x92bcd + +/a(.?)(.)/utf + a\x{240}bcd + +/a(.??)(.)/ + a\xc0\x92bcd + +/a(.??)(.)/utf + a\x{240}bcd + +/a(.{3})b/utf + a\x{1234}xyb + a\x{1234}\x{4321}yb + a\x{1234}\x{4321}\x{3412}b + *** Failers + a\x{1234}b + ac\ncb + +/a(.{3,})b/utf + a\x{1234}xyb + a\x{1234}\x{4321}yb + a\x{1234}\x{4321}\x{3412}b + axxxxbcdefghijb + a\x{1234}\x{4321}\x{3412}\x{3421}b + *** Failers + a\x{1234}b + +/a(.{3,}?)b/utf + a\x{1234}xyb + a\x{1234}\x{4321}yb + a\x{1234}\x{4321}\x{3412}b + axxxxbcdefghijb + a\x{1234}\x{4321}\x{3412}\x{3421}b + *** Failers + a\x{1234}b + +/a(.{3,5})b/utf + a\x{1234}xyb + a\x{1234}\x{4321}yb + a\x{1234}\x{4321}\x{3412}b + axxxxbcdefghijb + a\x{1234}\x{4321}\x{3412}\x{3421}b + axbxxbcdefghijb + axxxxxbcdefghijb + *** Failers + a\x{1234}b + axxxxxxbcdefghijb + +/a(.{3,5}?)b/utf + a\x{1234}xyb + a\x{1234}\x{4321}yb + a\x{1234}\x{4321}\x{3412}b + axxxxbcdefghijb + a\x{1234}\x{4321}\x{3412}\x{3421}b + axbxxbcdefghijb + axxxxxbcdefghijb + *** Failers + a\x{1234}b + axxxxxxbcdefghijb + +/^[a\x{c0}]/utf + *** Failers + \x{100} + +/(?<=aXb)cd/utf + aXbcd + +/(?<=a\x{100}b)cd/utf + a\x{100}bcd + +/(?<=a\x{100000}b)cd/utf + a\x{100000}bcd + +/(?:\x{100}){3}b/utf + \x{100}\x{100}\x{100}b + *** Failers + \x{100}\x{100}b + +/\x{ab}/utf + \x{ab} + \xc2\xab + *** Failers + \x00{ab} + +/(?<=(.))X/utf + WXYZ + \x{256}XYZ + *** Failers + XYZ + +/[^a]+/g,utf + bcd + \x{100}aY\x{256}Z + +/^[^a]{2}/utf + \x{100}bc + +/^[^a]{2,}/utf + \x{100}bcAa + +/^[^a]{2,}?/utf + \x{100}bca + +/[^a]+/gi,utf + bcd + \x{100}aY\x{256}Z + +/^[^a]{2}/i,utf + \x{100}bc + +/^[^a]{2,}/i,utf + \x{100}bcAa + +/^[^a]{2,}?/i,utf + \x{100}bca + +/\x{100}{0,0}/utf + abcd + +/\x{100}?/utf + abcd + \x{100}\x{100} + +/\x{100}{0,3}/utf + \x{100}\x{100} + \x{100}\x{100}\x{100}\x{100} + +/\x{100}*/utf + abce + \x{100}\x{100}\x{100}\x{100} + +/\x{100}{1,1}/utf + abcd\x{100}\x{100}\x{100}\x{100} + +/\x{100}{1,3}/utf + abcd\x{100}\x{100}\x{100}\x{100} + +/\x{100}+/utf + abcd\x{100}\x{100}\x{100}\x{100} + +/\x{100}{3}/utf + abcd\x{100}\x{100}\x{100}XX + +/\x{100}{3,5}/utf + abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX + +/\x{100}{3,}/utf + abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX + +/(?<=a\x{100}{2}b)X/utf,aftertext + Xyyya\x{100}\x{100}bXzzz + +/\D*/utf + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +/\D*/utf + \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + +/\D/utf + 1X2 + 1\x{100}2 + +/>\S/utf + > >X Y + > >\x{100} Y + +/\d/utf + \x{100}3 + +/\s/utf + \x{100} X + +/\D+/utf + 12abcd34 + *** Failers + 1234 + +/\D{2,3}/utf + 12abcd34 + 12ab34 + *** Failers + 1234 + 12a34 + +/\D{2,3}?/utf + 12abcd34 + 12ab34 + *** Failers + 1234 + 12a34 + +/\d+/utf + 12abcd34 + *** Failers + +/\d{2,3}/utf + 12abcd34 + 1234abcd + *** Failers + 1.4 + +/\d{2,3}?/utf + 12abcd34 + 1234abcd + *** Failers + 1.4 + +/\S+/utf + 12abcd34 + *** Failers + \ \ + +/\S{2,3}/utf + 12abcd34 + 1234abcd + *** Failers + \ \ + +/\S{2,3}?/utf + 12abcd34 + 1234abcd + *** Failers + \ \ + +/>\s+ <34 + *** Failers + +/>\s{2,3} \s{2,3}? \xff< + +/[\xff]/utf + >\x{ff}< + +/[^\xFF]/ + XYZ + +/[^\xff]/utf + XYZ + \x{123} + +/^[ac]*b/utf + xb + +/^[ac\x{100}]*b/utf + xb + +/^[^x]*b/i,utf + xb + +/^[^x]*b/utf + xb + +/^\d*b/utf + xb + +/(|a)/g,utf + catac + a\x{256}a + +/^\x{85}$/i,utf + \x{85} + +/^ሴ/utf + ሴ + +/^\ሴ/utf + ሴ + +"(?s)(.{1,5})"utf + abcdefg + ab + +/a*\x{100}*\w/utf + a + +/\S\S/g,utf + A\x{a3}BC + +/\S{2}/g,utf + A\x{a3}BC + +/\W\W/g,utf + +\x{a3}== + +/\W{2}/g,utf + +\x{a3}== + +/\S/g,utf + \x{442}\x{435}\x{441}\x{442} + +/[\S]/g,utf + \x{442}\x{435}\x{441}\x{442} + +/\D/g,utf + \x{442}\x{435}\x{441}\x{442} + +/[\D]/g,utf + \x{442}\x{435}\x{441}\x{442} + +/\W/g,utf + \x{2442}\x{2435}\x{2441}\x{2442} + +/[\W]/g,utf + \x{2442}\x{2435}\x{2441}\x{2442} + +/[\S\s]*/utf + abc\n\r\x{442}\x{435}\x{441}\x{442}xyz + +/[\x{41f}\S]/g,utf + \x{442}\x{435}\x{441}\x{442} + +/.[^\S]./g,utf + abc def\x{442}\x{443}xyz\npqr + +/.[^\S\n]./g,utf + abc def\x{442}\x{443}xyz\npqr + +/[[:^alnum:]]/g,utf + +\x{2442} + +/[[:^alpha:]]/g,utf + +\x{2442} + +/[[:^ascii:]]/g,utf + A\x{442} + +/[[:^blank:]]/g,utf + A\x{442} + +/[[:^cntrl:]]/g,utf + A\x{442} + +/[[:^digit:]]/g,utf + A\x{442} + +/[[:^graph:]]/g,utf + \x19\x{e01ff} + +/[[:^lower:]]/g,utf + A\x{422} + +/[[:^print:]]/g,utf + \x{19}\x{e01ff} + +/[[:^punct:]]/g,utf + A\x{442} + +/[[:^space:]]/g,utf + A\x{442} + +/[[:^upper:]]/g,utf + a\x{442} + +/[[:^word:]]/g,utf + +\x{2442} + +/[[:^xdigit:]]/g,utf + M\x{442} + +/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/utf + +/^[^d]*?$/ + abc + +/^[^d]*?$/utf + abc + +/^[^d]*?$/i + abc + +/^[^d]*?$/i,utf + abc + +/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/utf + +/^[a\x{c0}]b/utf + \x{c0}b + +/^([a\x{c0}]*?)aa/utf + a\x{c0}aaaa/ + +/^([a\x{c0}]*?)aa/utf + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/^([a\x{c0}]*)aa/utf + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/^([a\x{c0}]*)a\x{c0}/utf + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/A*/g,utf + AAB\x{123}BAA + +/(abc)\1/i,utf + abc + +/(abc)\1/utf + abc + +/a(*:a\x{1234}b)/utf,mark + abc + +/a(*:a£b)/utf,mark + abc + +# Noncharacters + +/./utf + \x{fffe} + \x{ffff} + \x{1fffe} + \x{1ffff} + \x{2fffe} + \x{2ffff} + \x{3fffe} + \x{3ffff} + \x{4fffe} + \x{4ffff} + \x{5fffe} + \x{5ffff} + \x{6fffe} + \x{6ffff} + \x{7fffe} + \x{7ffff} + \x{8fffe} + \x{8ffff} + \x{9fffe} + \x{9ffff} + \x{afffe} + \x{affff} + \x{bfffe} + \x{bffff} + \x{cfffe} + \x{cffff} + \x{dfffe} + \x{dffff} + \x{efffe} + \x{effff} + \x{ffffe} + \x{fffff} + \x{10fffe} + \x{10ffff} + \x{fdd0} + \x{fdd1} + \x{fdd2} + \x{fdd3} + \x{fdd4} + \x{fdd5} + \x{fdd6} + \x{fdd7} + \x{fdd8} + \x{fdd9} + \x{fdda} + \x{fddb} + \x{fddc} + \x{fddd} + \x{fdde} + \x{fddf} + \x{fde0} + \x{fde1} + \x{fde2} + \x{fde3} + \x{fde4} + \x{fde5} + \x{fde6} + \x{fde7} + \x{fde8} + \x{fde9} + \x{fdea} + \x{fdeb} + \x{fdec} + \x{fded} + \x{fdee} + \x{fdef} + +/^\d*\w{4}/utf + 1234 + 123 + +/^[^b]*\w{4}/utf + aaaa + aaa + +/^[^b]*\w{4}/i,utf + aaaa + aaa + +/^\x{100}*.{4}/utf + \x{100}\x{100}\x{100}\x{100} + \x{100}\x{100}\x{100} + +/^\x{100}*.{4}/i,utf + \x{100}\x{100}\x{100}\x{100} + \x{100}\x{100}\x{100} + +/^a+[a\x{200}]/utf + aa + +/^.\B.\B./utf + \x{10123}\x{10124}\x{10125} + +/^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/utf + #\x{10000}#\x{100}#\x{10ffff}# + +# Unicode property support tests + +/^\pC\pL\pM\pN\pP\pS\pZ\s+/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + +/^>\pZ+/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + +/^>[[:space:]]*/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + +/^>[[:blank:]]*/utf,ucp + >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028} + +/^[[:alpha:]]*/utf,ucp + Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d} + +/^[[:alnum:]]*/utf,ucp + Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee} + +/^[[:cntrl:]]*/utf,ucp + \x{0}\x{09}\x{1f}\x{7f}\x{9f} + +/^[[:graph:]]*/utf,ucp + A\x{a1}\x{a0} + +/^[[:print:]]*/utf,ucp + A z\x{a0}\x{a1} + +/^[[:punct:]]*/utf,ucp + .+\x{a1}\x{a0} + +/\p{Zs}*?\R/ + ** Failers + a\xFCb + +/\p{Zs}*\R/ + ** Failers + a\xFCb + +/ⱥ/i,utf + ⱥ + Ⱥx + Ⱥ + +/[ⱥ]/i,utf + ⱥ + Ⱥx + Ⱥ + +/Ⱥ/i,utf + Ⱥ + ⱥ + +# These are tests for extended grapheme clusters + +/^\X/utf,aftertext + G\x{34e}\x{34e}X + \x{34e}\x{34e}X + \x04X + \x{1100}X + \x{1100}\x{34e}X + \x{1b04}\x{1b04}X + *These match up to the roman letters + \x{1111}\x{1111}L,L + \x{1111}\x{1111}\x{1169}L,L,V + \x{1111}\x{ae4c}L, LV + \x{1111}\x{ad89}L, LVT + \x{1111}\x{ae4c}\x{1169}L, LV, V + \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V + \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T + \x{1111}\x{ad89}\x{11fe}L, LVT, T + \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T + \x{ad89}\x{11fe}\x{11fe}LVT, T, T + *These match just the first codepoint (invalid sequence) + \x{1111}\x{11fe}L, T + \x{ae4c}\x{1111}LV, L + \x{ae4c}\x{ae4c}LV, LV + \x{ae4c}\x{ad89}LV, LVT + \x{1169}\x{1111}V, L + \x{1169}\x{ae4c}V, LV + \x{1169}\x{ad89}V, LVT + \x{ad89}\x{1111}LVT, L + \x{ad89}\x{1169}LVT, V + \x{ad89}\x{ae4c}LVT, LV + \x{ad89}\x{ad89}LVT, LVT + \x{11fe}\x{1111}T, L + \x{11fe}\x{1169}T, V + \x{11fe}\x{ae4c}T, LV + \x{11fe}\x{ad89}T, LVT + *Test extend and spacing mark + \x{1111}\x{ae4c}\x{0711}L, LV, extend + \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark + \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark + *Test CR, LF, and control + \x0d\x{0711}CR, extend + \x0d\x{1b04}CR, spacingmark + \x0a\x{0711}LF, extend + \x0a\x{1b04}LF, spacingmark + \x0b\x{0711}Control, extend + \x09\x{1b04}Control, spacingmark + *There are no Prepend characters, so we can't test Prepend, CR + +/^(?>\X{2})X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + +/^\X{2,4}X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + +/^\X{2,4}?X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + +/\X*Z/utf,no_start_optimize + A\x{300} + +/\X*(.)/utf,no_start_optimize + A\x{1111}\x{ae4c}\x{1169} + +# -------------------------------------------- + +/\x{1e9e}+/i,utf + \x{1e9e}\x{00df} + +/[z\x{1e9e}]+/i,utf + \x{1e9e}\x{00df} + +/\x{00df}+/i,utf + \x{1e9e}\x{00df} + +/[z\x{00df}]+/i,utf + \x{1e9e}\x{00df} + +/\x{1f88}+/i,utf + \x{1f88}\x{1f80} + +/[z\x{1f88}]+/i,utf + \x{1f88}\x{1f80} + +# Characters with more than one other case; test in classes + +/[z\x{00b5}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + +/[z\x{039c}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + +/[z\x{03bc}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + +/[z\x{00c5}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + +/[z\x{00e5}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + +/[z\x{212b}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + +/[z\x{01c4}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + +/[z\x{01c5}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + +/[z\x{01c6}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + +/[z\x{01c7}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + +/[z\x{01c8}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + +/[z\x{01c9}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + +/[z\x{01ca}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + +/[z\x{01cb}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + +/[z\x{01cc}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + +/[z\x{01f1}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + +/[z\x{01f2}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + +/[z\x{01f3}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + +/[z\x{0345}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/[z\x{0399}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/[z\x{03b9}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/[z\x{1fbe}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/[z\x{0392}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + +/[z\x{03b2}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + +/[z\x{03d0}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + +/[z\x{0395}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + +/[z\x{03b5}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + +/[z\x{03f5}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + +/[z\x{0398}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/[z\x{03b8}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/[z\x{03d1}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/[z\x{03f4}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/[z\x{039a}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + +/[z\x{03ba}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + +/[z\x{03f0}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + +/[z\x{03a0}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + +/[z\x{03c0}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + +/[z\x{03d6}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + +/[z\x{03a1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + +/[z\x{03c1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + +/[z\x{03f1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + +/[z\x{03a3}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + +/[z\x{03c2}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + +/[z\x{03c3}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + +/[z\x{03a6}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + +/[z\x{03c6}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + +/[z\x{03d5}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + +/[z\x{03c9}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + +/[z\x{03a9}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + +/[z\x{2126}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + +/[z\x{1e60}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + +/[z\x{1e61}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + +/[z\x{1e9b}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + +# Perl 5.12.4 gets these wrong, but 5.15.3 is OK + +/[z\x{004b}]+/i,utf + \x{004b}\x{006b}\x{212a} + +/[z\x{006b}]+/i,utf + \x{004b}\x{006b}\x{212a} + +/[z\x{212a}]+/i,utf + \x{004b}\x{006b}\x{212a} + +/[z\x{0053}]+/i,utf + \x{0053}\x{0073}\x{017f} + +/[z\x{0073}]+/i,utf + \x{0053}\x{0073}\x{017f} + +/[z\x{017f}]+/i,utf + \x{0053}\x{0073}\x{017f} + +# -------------------------------------- + +/(ΣΆΜΟΣ) \1/i,utf + ΣΆΜΟΣ ΣΆΜΟΣ + ΣΆΜΟΣ σάμος + σάμος σάμος + σάμος σάμοσ + σάμος ΣΆΜΟΣ + +/(σάμος) \1/i,utf + ΣΆΜΟΣ ΣΆΜΟΣ + ΣΆΜΟΣ σάμος + σάμος σάμος + σάμος σάμοσ + σάμος ΣΆΜΟΣ + +/(ΣΆΜΟΣ) \1*/i,utf + ΣΆΜΟΣ\x20 + ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος + +# Perl matches these + +/\x{00b5}+/i,utf + \x{00b5}\x{039c}\x{03bc} + +/\x{039c}+/i,utf + \x{00b5}\x{039c}\x{03bc} + +/\x{03bc}+/i,utf + \x{00b5}\x{039c}\x{03bc} + + +/\x{00c5}+/i,utf + \x{00c5}\x{00e5}\x{212b} + +/\x{00e5}+/i,utf + \x{00c5}\x{00e5}\x{212b} + +/\x{212b}+/i,utf + \x{00c5}\x{00e5}\x{212b} + + +/\x{01c4}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + +/\x{01c5}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + +/\x{01c6}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + + +/\x{01c7}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + +/\x{01c8}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + +/\x{01c9}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + + +/\x{01ca}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + +/\x{01cb}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + +/\x{01cc}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + + +/\x{01f1}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + +/\x{01f2}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + +/\x{01f3}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + + +/\x{0345}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/\x{0399}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/\x{03b9}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + +/\x{1fbe}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + + +/\x{0392}+/i,utf + \x{0392}\x{03b2}\x{03d0} + +/\x{03b2}+/i,utf + \x{0392}\x{03b2}\x{03d0} + +/\x{03d0}+/i,utf + \x{0392}\x{03b2}\x{03d0} + + +/\x{0395}+/i,utf + \x{0395}\x{03b5}\x{03f5} + +/\x{03b5}+/i,utf + \x{0395}\x{03b5}\x{03f5} + +/\x{03f5}+/i,utf + \x{0395}\x{03b5}\x{03f5} + + +/\x{0398}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/\x{03b8}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/\x{03d1}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + +/\x{03f4}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + + +/\x{039a}+/i,utf + \x{039a}\x{03ba}\x{03f0} + +/\x{03ba}+/i,utf + \x{039a}\x{03ba}\x{03f0} + +/\x{03f0}+/i,utf + \x{039a}\x{03ba}\x{03f0} + + +/\x{03a0}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + +/\x{03c0}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + +/\x{03d6}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + + +/\x{03a1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + +/\x{03c1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + +/\x{03f1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + + +/\x{03a3}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + +/\x{03c2}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + +/\x{03c3}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + + +/\x{03a6}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + +/\x{03c6}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + +/\x{03d5}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + + +/\x{03c9}+/i,utf + \x{03c9}\x{03a9}\x{2126} + +/\x{03a9}+/i,utf + \x{03c9}\x{03a9}\x{2126} + +/\x{2126}+/i,utf + \x{03c9}\x{03a9}\x{2126} + + +/\x{1e60}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + +/\x{1e61}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + +/\x{1e9b}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + + +/\x{1e9e}+/i,utf + \x{1e9e}\x{00df} + +/\x{00df}+/i,utf + \x{1e9e}\x{00df} + + +/\x{1f88}+/i,utf + \x{1f88}\x{1f80} + +/\x{1f80}+/i,utf + \x{1f88}\x{1f80} + +# Perl 5.12.4 gets these wrong, but 5.15.3 is OK + +/\x{004b}+/i,utf + \x{004b}\x{006b}\x{212a} + +/\x{006b}+/i,utf + \x{004b}\x{006b}\x{212a} + +/\x{212a}+/i,utf + \x{004b}\x{006b}\x{212a} + + +/\x{0053}+/i,utf + \x{0053}\x{0073}\x{017f} + +/\x{0073}+/i,utf + \x{0053}\x{0073}\x{017f} + +/\x{017f}+/i,utf + \x{0053}\x{0073}\x{017f} + +/^\p{Any}*\d{4}/utf + 1234 + 123 + +/^\X*\w{4}/utf + 1234 + 123 + +/^A\s+Z/utf,ucp + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/utf,ucp + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + +/^[[:graph:]]+$/utf,ucp + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + \x{09} + \x{0a} + \x{1D} + \x{20} + \x{85} + \x{a0} + \x{61c} + \x{1680} + \x{180e} + \x{2028} + \x{2029} + \x{202f} + \x{2065} + \x{2066} + \x{2067} + \x{2068} + \x{2069} + \x{3000} + \x{e0002} + \x{e001f} + \x{e0080} + +/^[[:print:]]+$/utf,ucp + Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + \x{3000} + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + \x{09} + \x{1D} + \x{85} + \x{61c} + \x{2028} + \x{2029} + \x{2065} + \x{2066} + \x{2067} + \x{2068} + \x{2069} + \x{e0002} + \x{e001f} + \x{e0080} + +/^[[:punct:]]+$/utf,ucp + \$+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + \x{a1}\x{a7} + \x{37e} + ** Failers + abcde + +/^[[:^graph:]]+$/utf,ucp + \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e} + \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + \x{3000}\x{e0002}\x{e001f}\x{e0080} + ** Failers + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + +/^[[:^print:]]+$/utf,ucp + \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + ** Failers + Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + \x{3000} + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + +/^[[:^punct:]]+$/utf,ucp + abcde + ** Failers + \$+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + \x{a1}\x{a7} + \x{37e} + +/[RST]+/i,utf,ucp + Ss\x{17f} + +/[R-T]+/i,utf,ucp + Ss\x{17f} + +/[q-u]+/i,utf,ucp + Ss\x{17f} + +/^s?c/im,utf + scat + +# End of testinput4 diff --git a/testdata/testoutput4 b/testdata/testoutput4 new file mode 100644 index 0000000..97cff37 --- /dev/null +++ b/testdata/testoutput4 @@ -0,0 +1,3722 @@ +# This set of tests is for UTF support, including Unicode properties. The +# Unicode tests are all compatible with all versions of Perl >= 5.10, but +# some of the property tests may differ because of different versions of +# Unicode in use by PCRE2 and Perl. + +#perltest + +/a.b/utf + acb + 0: acb + a\x7fb + 0: a\x{7f}b + a\x{100}b + 0: a\x{100}b + *** Failers +No match + a\nb +No match + +/a(.{3})b/utf + a\x{4000}xyb + 0: a\x{4000}xyb + 1: \x{4000}xy + a\x{4000}\x7fyb + 0: a\x{4000}\x{7f}yb + 1: \x{4000}\x{7f}y + a\x{4000}\x{100}yb + 0: a\x{4000}\x{100}yb + 1: \x{4000}\x{100}y + *** Failers +No match + a\x{4000}b +No match + ac\ncb +No match + +/a(.*?)(.)/ + a\xc0\x88b + 0: a\xc0 + 1: + 2: \xc0 + +/a(.*?)(.)/utf + a\x{100}b + 0: a\x{100} + 1: + 2: \x{100} + +/a(.*)(.)/ + a\xc0\x88b + 0: a\xc0\x88b + 1: \xc0\x88 + 2: b + +/a(.*)(.)/utf + a\x{100}b + 0: a\x{100}b + 1: \x{100} + 2: b + +/a(.)(.)/ + a\xc0\x92bcd + 0: a\xc0\x92 + 1: \xc0 + 2: \x92 + +/a(.)(.)/utf + a\x{240}bcd + 0: a\x{240}b + 1: \x{240} + 2: b + +/a(.?)(.)/ + a\xc0\x92bcd + 0: a\xc0\x92 + 1: \xc0 + 2: \x92 + +/a(.?)(.)/utf + a\x{240}bcd + 0: a\x{240}b + 1: \x{240} + 2: b + +/a(.??)(.)/ + a\xc0\x92bcd + 0: a\xc0 + 1: + 2: \xc0 + +/a(.??)(.)/utf + a\x{240}bcd + 0: a\x{240} + 1: + 2: \x{240} + +/a(.{3})b/utf + a\x{1234}xyb + 0: a\x{1234}xyb + 1: \x{1234}xy + a\x{1234}\x{4321}yb + 0: a\x{1234}\x{4321}yb + 1: \x{1234}\x{4321}y + a\x{1234}\x{4321}\x{3412}b + 0: a\x{1234}\x{4321}\x{3412}b + 1: \x{1234}\x{4321}\x{3412} + *** Failers +No match + a\x{1234}b +No match + ac\ncb +No match + +/a(.{3,})b/utf + a\x{1234}xyb + 0: a\x{1234}xyb + 1: \x{1234}xy + a\x{1234}\x{4321}yb + 0: a\x{1234}\x{4321}yb + 1: \x{1234}\x{4321}y + a\x{1234}\x{4321}\x{3412}b + 0: a\x{1234}\x{4321}\x{3412}b + 1: \x{1234}\x{4321}\x{3412} + axxxxbcdefghijb + 0: axxxxbcdefghijb + 1: xxxxbcdefghij + a\x{1234}\x{4321}\x{3412}\x{3421}b + 0: a\x{1234}\x{4321}\x{3412}\x{3421}b + 1: \x{1234}\x{4321}\x{3412}\x{3421} + *** Failers +No match + a\x{1234}b +No match + +/a(.{3,}?)b/utf + a\x{1234}xyb + 0: a\x{1234}xyb + 1: \x{1234}xy + a\x{1234}\x{4321}yb + 0: a\x{1234}\x{4321}yb + 1: \x{1234}\x{4321}y + a\x{1234}\x{4321}\x{3412}b + 0: a\x{1234}\x{4321}\x{3412}b + 1: \x{1234}\x{4321}\x{3412} + axxxxbcdefghijb + 0: axxxxb + 1: xxxx + a\x{1234}\x{4321}\x{3412}\x{3421}b + 0: a\x{1234}\x{4321}\x{3412}\x{3421}b + 1: \x{1234}\x{4321}\x{3412}\x{3421} + *** Failers +No match + a\x{1234}b +No match + +/a(.{3,5})b/utf + a\x{1234}xyb + 0: a\x{1234}xyb + 1: \x{1234}xy + a\x{1234}\x{4321}yb + 0: a\x{1234}\x{4321}yb + 1: \x{1234}\x{4321}y + a\x{1234}\x{4321}\x{3412}b + 0: a\x{1234}\x{4321}\x{3412}b + 1: \x{1234}\x{4321}\x{3412} + axxxxbcdefghijb + 0: axxxxb + 1: xxxx + a\x{1234}\x{4321}\x{3412}\x{3421}b + 0: a\x{1234}\x{4321}\x{3412}\x{3421}b + 1: \x{1234}\x{4321}\x{3412}\x{3421} + axbxxbcdefghijb + 0: axbxxb + 1: xbxx + axxxxxbcdefghijb + 0: axxxxxb + 1: xxxxx + *** Failers +No match + a\x{1234}b +No match + axxxxxxbcdefghijb +No match + +/a(.{3,5}?)b/utf + a\x{1234}xyb + 0: a\x{1234}xyb + 1: \x{1234}xy + a\x{1234}\x{4321}yb + 0: a\x{1234}\x{4321}yb + 1: \x{1234}\x{4321}y + a\x{1234}\x{4321}\x{3412}b + 0: a\x{1234}\x{4321}\x{3412}b + 1: \x{1234}\x{4321}\x{3412} + axxxxbcdefghijb + 0: axxxxb + 1: xxxx + a\x{1234}\x{4321}\x{3412}\x{3421}b + 0: a\x{1234}\x{4321}\x{3412}\x{3421}b + 1: \x{1234}\x{4321}\x{3412}\x{3421} + axbxxbcdefghijb + 0: axbxxb + 1: xbxx + axxxxxbcdefghijb + 0: axxxxxb + 1: xxxxx + *** Failers +No match + a\x{1234}b +No match + axxxxxxbcdefghijb +No match + +/^[a\x{c0}]/utf + *** Failers +No match + \x{100} +No match + +/(?<=aXb)cd/utf + aXbcd + 0: cd + +/(?<=a\x{100}b)cd/utf + a\x{100}bcd + 0: cd + +/(?<=a\x{100000}b)cd/utf + a\x{100000}bcd + 0: cd + +/(?:\x{100}){3}b/utf + \x{100}\x{100}\x{100}b + 0: \x{100}\x{100}\x{100}b + *** Failers +No match + \x{100}\x{100}b +No match + +/\x{ab}/utf + \x{ab} + 0: \x{ab} + \xc2\xab + 0: \x{ab} + *** Failers +No match + \x00{ab} +No match + +/(?<=(.))X/utf + WXYZ + 0: X + 1: W + \x{256}XYZ + 0: X + 1: \x{256} + *** Failers +No match + XYZ +No match + +/[^a]+/g,utf + bcd + 0: bcd + \x{100}aY\x{256}Z + 0: \x{100} + 0: Y\x{256}Z + +/^[^a]{2}/utf + \x{100}bc + 0: \x{100}b + +/^[^a]{2,}/utf + \x{100}bcAa + 0: \x{100}bcA + +/^[^a]{2,}?/utf + \x{100}bca + 0: \x{100}b + +/[^a]+/gi,utf + bcd + 0: bcd + \x{100}aY\x{256}Z + 0: \x{100} + 0: Y\x{256}Z + +/^[^a]{2}/i,utf + \x{100}bc + 0: \x{100}b + +/^[^a]{2,}/i,utf + \x{100}bcAa + 0: \x{100}bc + +/^[^a]{2,}?/i,utf + \x{100}bca + 0: \x{100}b + +/\x{100}{0,0}/utf + abcd + 0: + +/\x{100}?/utf + abcd + 0: + \x{100}\x{100} + 0: \x{100} + +/\x{100}{0,3}/utf + \x{100}\x{100} + 0: \x{100}\x{100} + \x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100} + +/\x{100}*/utf + abce + 0: + \x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100}\x{100} + +/\x{100}{1,1}/utf + abcd\x{100}\x{100}\x{100}\x{100} + 0: \x{100} + +/\x{100}{1,3}/utf + abcd\x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100} + +/\x{100}+/utf + abcd\x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100}\x{100} + +/\x{100}{3}/utf + abcd\x{100}\x{100}\x{100}XX + 0: \x{100}\x{100}\x{100} + +/\x{100}{3,5}/utf + abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX + 0: \x{100}\x{100}\x{100}\x{100}\x{100} + +/\x{100}{3,}/utf + abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX + 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + +/(?<=a\x{100}{2}b)X/utf,aftertext + Xyyya\x{100}\x{100}bXzzz + 0: X + 0+ zzz + +/\D*/utf + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +/\D*/utf + \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + +/\D/utf + 1X2 + 0: X + 1\x{100}2 + 0: \x{100} + +/>\S/utf + > >X Y + 0: >X + > >\x{100} Y + 0: >\x{100} + +/\d/utf + \x{100}3 + 0: 3 + +/\s/utf + \x{100} X + 0: + +/\D+/utf + 12abcd34 + 0: abcd + *** Failers + 0: *** Failers + 1234 +No match + +/\D{2,3}/utf + 12abcd34 + 0: abc + 12ab34 + 0: ab + *** Failers + 0: *** + 1234 +No match + 12a34 +No match + +/\D{2,3}?/utf + 12abcd34 + 0: ab + 12ab34 + 0: ab + *** Failers + 0: ** + 1234 +No match + 12a34 +No match + +/\d+/utf + 12abcd34 + 0: 12 + *** Failers +No match + +/\d{2,3}/utf + 12abcd34 + 0: 12 + 1234abcd + 0: 123 + *** Failers +No match + 1.4 +No match + +/\d{2,3}?/utf + 12abcd34 + 0: 12 + 1234abcd + 0: 12 + *** Failers +No match + 1.4 +No match + +/\S+/utf + 12abcd34 + 0: 12abcd34 + *** Failers + 0: *** + \ \ +No match + +/\S{2,3}/utf + 12abcd34 + 0: 12a + 1234abcd + 0: 123 + *** Failers + 0: *** + \ \ +No match + +/\S{2,3}?/utf + 12abcd34 + 0: 12 + 1234abcd + 0: 12 + *** Failers + 0: ** + \ \ +No match + +/>\s+ <34 + 0: > < + 0+ 34 + *** Failers +No match + +/>\s{2,3} < + 0+ cd + ab> < + 0+ ce + *** Failers +No match + ab> \s{2,3}? < + 0+ cd + ab> < + 0+ ce + *** Failers +No match + ab> \xff< + 0: \xff + +/[\xff]/utf + >\x{ff}< + 0: \x{ff} + +/[^\xFF]/ + XYZ + 0: X + +/[^\xff]/utf + XYZ + 0: X + \x{123} + 0: \x{123} + +/^[ac]*b/utf + xb +No match + +/^[ac\x{100}]*b/utf + xb +No match + +/^[^x]*b/i,utf + xb +No match + +/^[^x]*b/utf + xb +No match + +/^\d*b/utf + xb +No match + +/(|a)/g,utf + catac + 0: + 1: + 0: + 1: + 0: a + 1: a + 0: + 1: + 0: + 1: + 0: a + 1: a + 0: + 1: + 0: + 1: + a\x{256}a + 0: + 1: + 0: a + 1: a + 0: + 1: + 0: + 1: + 0: a + 1: a + 0: + 1: + +/^\x{85}$/i,utf + \x{85} + 0: \x{85} + +/^ሴ/utf + ሴ + 0: \x{1234} + +/^\ሴ/utf + ሴ + 0: \x{1234} + +"(?s)(.{1,5})"utf + abcdefg + 0: abcde + 1: abcde + ab + 0: ab + 1: ab + +/a*\x{100}*\w/utf + a + 0: a + +/\S\S/g,utf + A\x{a3}BC + 0: A\x{a3} + 0: BC + +/\S{2}/g,utf + A\x{a3}BC + 0: A\x{a3} + 0: BC + +/\W\W/g,utf + +\x{a3}== + 0: +\x{a3} + 0: == + +/\W{2}/g,utf + +\x{a3}== + 0: +\x{a3} + 0: == + +/\S/g,utf + \x{442}\x{435}\x{441}\x{442} + 0: \x{442} + 0: \x{435} + 0: \x{441} + 0: \x{442} + +/[\S]/g,utf + \x{442}\x{435}\x{441}\x{442} + 0: \x{442} + 0: \x{435} + 0: \x{441} + 0: \x{442} + +/\D/g,utf + \x{442}\x{435}\x{441}\x{442} + 0: \x{442} + 0: \x{435} + 0: \x{441} + 0: \x{442} + +/[\D]/g,utf + \x{442}\x{435}\x{441}\x{442} + 0: \x{442} + 0: \x{435} + 0: \x{441} + 0: \x{442} + +/\W/g,utf + \x{2442}\x{2435}\x{2441}\x{2442} + 0: \x{2442} + 0: \x{2435} + 0: \x{2441} + 0: \x{2442} + +/[\W]/g,utf + \x{2442}\x{2435}\x{2441}\x{2442} + 0: \x{2442} + 0: \x{2435} + 0: \x{2441} + 0: \x{2442} + +/[\S\s]*/utf + abc\n\r\x{442}\x{435}\x{441}\x{442}xyz + 0: abc\x{0a}\x{0d}\x{442}\x{435}\x{441}\x{442}xyz + +/[\x{41f}\S]/g,utf + \x{442}\x{435}\x{441}\x{442} + 0: \x{442} + 0: \x{435} + 0: \x{441} + 0: \x{442} + +/.[^\S]./g,utf + abc def\x{442}\x{443}xyz\npqr + 0: c d + 0: z\x{0a}p + +/.[^\S\n]./g,utf + abc def\x{442}\x{443}xyz\npqr + 0: c d + +/[[:^alnum:]]/g,utf + +\x{2442} + 0: + + 0: \x{2442} + +/[[:^alpha:]]/g,utf + +\x{2442} + 0: + + 0: \x{2442} + +/[[:^ascii:]]/g,utf + A\x{442} + 0: \x{442} + +/[[:^blank:]]/g,utf + A\x{442} + 0: A + 0: \x{442} + +/[[:^cntrl:]]/g,utf + A\x{442} + 0: A + 0: \x{442} + +/[[:^digit:]]/g,utf + A\x{442} + 0: A + 0: \x{442} + +/[[:^graph:]]/g,utf + \x19\x{e01ff} + 0: \x{19} + 0: \x{e01ff} + +/[[:^lower:]]/g,utf + A\x{422} + 0: A + 0: \x{422} + +/[[:^print:]]/g,utf + \x{19}\x{e01ff} + 0: \x{19} + 0: \x{e01ff} + +/[[:^punct:]]/g,utf + A\x{442} + 0: A + 0: \x{442} + +/[[:^space:]]/g,utf + A\x{442} + 0: A + 0: \x{442} + +/[[:^upper:]]/g,utf + a\x{442} + 0: a + 0: \x{442} + +/[[:^word:]]/g,utf + +\x{2442} + 0: + + 0: \x{2442} + +/[[:^xdigit:]]/g,utf + M\x{442} + 0: M + 0: \x{442} + +/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/utf + +/^[^d]*?$/ + abc + 0: abc + +/^[^d]*?$/utf + abc + 0: abc + +/^[^d]*?$/i + abc + 0: abc + +/^[^d]*?$/i,utf + abc + 0: abc + +/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/utf + +/^[a\x{c0}]b/utf + \x{c0}b + 0: \x{c0}b + +/^([a\x{c0}]*?)aa/utf + a\x{c0}aaaa/ + 0: a\x{c0}aa + 1: a\x{c0} + +/^([a\x{c0}]*?)aa/utf + a\x{c0}aaaa/ + 0: a\x{c0}aa + 1: a\x{c0} + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0}aa + 1: a\x{c0}a\x{c0} + +/^([a\x{c0}]*)aa/utf + a\x{c0}aaaa/ + 0: a\x{c0}aaaa + 1: a\x{c0}aa + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0}aaa + 1: a\x{c0}a\x{c0}a + +/^([a\x{c0}]*)a\x{c0}/utf + a\x{c0}aaaa/ + 0: a\x{c0} + 1: + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0} + 1: a\x{c0} + +/A*/g,utf + AAB\x{123}BAA + 0: AA + 0: + 0: + 0: + 0: AA + 0: + +/(abc)\1/i,utf + abc +No match + +/(abc)\1/utf + abc +No match + +/a(*:a\x{1234}b)/utf,mark + abc + 0: a +MK: a\x{1234}b + +/a(*:a£b)/utf,mark + abc + 0: a +MK: a\x{a3}b + +# Noncharacters + +/./utf + \x{fffe} + 0: \x{fffe} + \x{ffff} + 0: \x{ffff} + \x{1fffe} + 0: \x{1fffe} + \x{1ffff} + 0: \x{1ffff} + \x{2fffe} + 0: \x{2fffe} + \x{2ffff} + 0: \x{2ffff} + \x{3fffe} + 0: \x{3fffe} + \x{3ffff} + 0: \x{3ffff} + \x{4fffe} + 0: \x{4fffe} + \x{4ffff} + 0: \x{4ffff} + \x{5fffe} + 0: \x{5fffe} + \x{5ffff} + 0: \x{5ffff} + \x{6fffe} + 0: \x{6fffe} + \x{6ffff} + 0: \x{6ffff} + \x{7fffe} + 0: \x{7fffe} + \x{7ffff} + 0: \x{7ffff} + \x{8fffe} + 0: \x{8fffe} + \x{8ffff} + 0: \x{8ffff} + \x{9fffe} + 0: \x{9fffe} + \x{9ffff} + 0: \x{9ffff} + \x{afffe} + 0: \x{afffe} + \x{affff} + 0: \x{affff} + \x{bfffe} + 0: \x{bfffe} + \x{bffff} + 0: \x{bffff} + \x{cfffe} + 0: \x{cfffe} + \x{cffff} + 0: \x{cffff} + \x{dfffe} + 0: \x{dfffe} + \x{dffff} + 0: \x{dffff} + \x{efffe} + 0: \x{efffe} + \x{effff} + 0: \x{effff} + \x{ffffe} + 0: \x{ffffe} + \x{fffff} + 0: \x{fffff} + \x{10fffe} + 0: \x{10fffe} + \x{10ffff} + 0: \x{10ffff} + \x{fdd0} + 0: \x{fdd0} + \x{fdd1} + 0: \x{fdd1} + \x{fdd2} + 0: \x{fdd2} + \x{fdd3} + 0: \x{fdd3} + \x{fdd4} + 0: \x{fdd4} + \x{fdd5} + 0: \x{fdd5} + \x{fdd6} + 0: \x{fdd6} + \x{fdd7} + 0: \x{fdd7} + \x{fdd8} + 0: \x{fdd8} + \x{fdd9} + 0: \x{fdd9} + \x{fdda} + 0: \x{fdda} + \x{fddb} + 0: \x{fddb} + \x{fddc} + 0: \x{fddc} + \x{fddd} + 0: \x{fddd} + \x{fdde} + 0: \x{fdde} + \x{fddf} + 0: \x{fddf} + \x{fde0} + 0: \x{fde0} + \x{fde1} + 0: \x{fde1} + \x{fde2} + 0: \x{fde2} + \x{fde3} + 0: \x{fde3} + \x{fde4} + 0: \x{fde4} + \x{fde5} + 0: \x{fde5} + \x{fde6} + 0: \x{fde6} + \x{fde7} + 0: \x{fde7} + \x{fde8} + 0: \x{fde8} + \x{fde9} + 0: \x{fde9} + \x{fdea} + 0: \x{fdea} + \x{fdeb} + 0: \x{fdeb} + \x{fdec} + 0: \x{fdec} + \x{fded} + 0: \x{fded} + \x{fdee} + 0: \x{fdee} + \x{fdef} + 0: \x{fdef} + +/^\d*\w{4}/utf + 1234 + 0: 1234 + 123 +No match + +/^[^b]*\w{4}/utf + aaaa + 0: aaaa + aaa +No match + +/^[^b]*\w{4}/i,utf + aaaa + 0: aaaa + aaa +No match + +/^\x{100}*.{4}/utf + \x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100}\x{100} + \x{100}\x{100}\x{100} +No match + +/^\x{100}*.{4}/i,utf + \x{100}\x{100}\x{100}\x{100} + 0: \x{100}\x{100}\x{100}\x{100} + \x{100}\x{100}\x{100} +No match + +/^a+[a\x{200}]/utf + aa + 0: aa + +/^.\B.\B./utf + \x{10123}\x{10124}\x{10125} + 0: \x{10123}\x{10124}\x{10125} + +/^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/utf + #\x{10000}#\x{100}#\x{10ffff}# + 0: #\x{10000}#\x{100}#\x{10ffff}# + +# Unicode property support tests + +/^\pC\pL\pM\pN\pP\pS\pZ\s+/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b} + +/^>\pZ+/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f} + +/^>[[:space:]]*/utf,ucp + >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} + 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b} + +/^>[[:blank:]]*/utf,ucp + >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028} + 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09} + +/^[[:alpha:]]*/utf,ucp + Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d} + 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d} + +/^[[:alnum:]]*/utf,ucp + Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee} + 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee} + +/^[[:cntrl:]]*/utf,ucp + \x{0}\x{09}\x{1f}\x{7f}\x{9f} + 0: \x{00}\x{09}\x{1f}\x{7f} + +/^[[:graph:]]*/utf,ucp + A\x{a1}\x{a0} + 0: A\x{a1} + +/^[[:print:]]*/utf,ucp + A z\x{a0}\x{a1} + 0: A z\x{a0}\x{a1} + +/^[[:punct:]]*/utf,ucp + .+\x{a1}\x{a0} + 0: .+\x{a1} + +/\p{Zs}*?\R/ + ** Failers +No match + a\xFCb +No match + +/\p{Zs}*\R/ + ** Failers +No match + a\xFCb +No match + +/ⱥ/i,utf + ⱥ + 0: \x{2c65} + Ⱥx + 0: \x{23a} + Ⱥ + 0: \x{23a} + +/[ⱥ]/i,utf + ⱥ + 0: \x{2c65} + Ⱥx + 0: \x{23a} + Ⱥ + 0: \x{23a} + +/Ⱥ/i,utf + Ⱥ + 0: \x{23a} + ⱥ + 0: \x{2c65} + +# These are tests for extended grapheme clusters + +/^\X/utf,aftertext + G\x{34e}\x{34e}X + 0: G\x{34e}\x{34e} + 0+ X + \x{34e}\x{34e}X + 0: \x{34e}\x{34e} + 0+ X + \x04X + 0: \x{04} + 0+ X + \x{1100}X + 0: \x{1100} + 0+ X + \x{1100}\x{34e}X + 0: \x{1100}\x{34e} + 0+ X + \x{1b04}\x{1b04}X + 0: \x{1b04}\x{1b04} + 0+ X + *These match up to the roman letters + 0: * + 0+ These match up to the roman letters + \x{1111}\x{1111}L,L + 0: \x{1111}\x{1111} + 0+ L,L + \x{1111}\x{1111}\x{1169}L,L,V + 0: \x{1111}\x{1111}\x{1169} + 0+ L,L,V + \x{1111}\x{ae4c}L, LV + 0: \x{1111}\x{ae4c} + 0+ L, LV + \x{1111}\x{ad89}L, LVT + 0: \x{1111}\x{ad89} + 0+ L, LVT + \x{1111}\x{ae4c}\x{1169}L, LV, V + 0: \x{1111}\x{ae4c}\x{1169} + 0+ L, LV, V + \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V + 0: \x{1111}\x{ae4c}\x{1169}\x{1169} + 0+ L, LV, V, V + \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T + 0: \x{1111}\x{ae4c}\x{1169}\x{11fe} + 0+ L, LV, V, T + \x{1111}\x{ad89}\x{11fe}L, LVT, T + 0: \x{1111}\x{ad89}\x{11fe} + 0+ L, LVT, T + \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T + 0: \x{1111}\x{ad89}\x{11fe}\x{11fe} + 0+ L, LVT, T, T + \x{ad89}\x{11fe}\x{11fe}LVT, T, T + 0: \x{ad89}\x{11fe}\x{11fe} + 0+ LVT, T, T + *These match just the first codepoint (invalid sequence) + 0: * + 0+ These match just the first codepoint (invalid sequence) + \x{1111}\x{11fe}L, T + 0: \x{1111} + 0+ \x{11fe}L, T + \x{ae4c}\x{1111}LV, L + 0: \x{ae4c} + 0+ \x{1111}LV, L + \x{ae4c}\x{ae4c}LV, LV + 0: \x{ae4c} + 0+ \x{ae4c}LV, LV + \x{ae4c}\x{ad89}LV, LVT + 0: \x{ae4c} + 0+ \x{ad89}LV, LVT + \x{1169}\x{1111}V, L + 0: \x{1169} + 0+ \x{1111}V, L + \x{1169}\x{ae4c}V, LV + 0: \x{1169} + 0+ \x{ae4c}V, LV + \x{1169}\x{ad89}V, LVT + 0: \x{1169} + 0+ \x{ad89}V, LVT + \x{ad89}\x{1111}LVT, L + 0: \x{ad89} + 0+ \x{1111}LVT, L + \x{ad89}\x{1169}LVT, V + 0: \x{ad89} + 0+ \x{1169}LVT, V + \x{ad89}\x{ae4c}LVT, LV + 0: \x{ad89} + 0+ \x{ae4c}LVT, LV + \x{ad89}\x{ad89}LVT, LVT + 0: \x{ad89} + 0+ \x{ad89}LVT, LVT + \x{11fe}\x{1111}T, L + 0: \x{11fe} + 0+ \x{1111}T, L + \x{11fe}\x{1169}T, V + 0: \x{11fe} + 0+ \x{1169}T, V + \x{11fe}\x{ae4c}T, LV + 0: \x{11fe} + 0+ \x{ae4c}T, LV + \x{11fe}\x{ad89}T, LVT + 0: \x{11fe} + 0+ \x{ad89}T, LVT + *Test extend and spacing mark + 0: * + 0+ Test extend and spacing mark + \x{1111}\x{ae4c}\x{0711}L, LV, extend + 0: \x{1111}\x{ae4c}\x{711} + 0+ L, LV, extend + \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark + 0: \x{1111}\x{ae4c}\x{1b04} + 0+ L, LV, spacing mark + \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark + 0: \x{1111}\x{ae4c}\x{1b04}\x{711}\x{1b04} + 0+ L, LV, spacing mark, extend, spacing mark + *Test CR, LF, and control + 0: * + 0+ Test CR, LF, and control + \x0d\x{0711}CR, extend + 0: \x{0d} + 0+ \x{711}CR, extend + \x0d\x{1b04}CR, spacingmark + 0: \x{0d} + 0+ \x{1b04}CR, spacingmark + \x0a\x{0711}LF, extend + 0: \x{0a} + 0+ \x{711}LF, extend + \x0a\x{1b04}LF, spacingmark + 0: \x{0a} + 0+ \x{1b04}LF, spacingmark + \x0b\x{0711}Control, extend + 0: \x{0b} + 0+ \x{711}Control, extend + \x09\x{1b04}Control, spacingmark + 0: \x{09} + 0+ \x{1b04}Control, spacingmark + *There are no Prepend characters, so we can't test Prepend, CR + 0: * + 0+ There are no Prepend characters, so we can't test Prepend, CR + +/^(?>\X{2})X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + +/^\X{2,4}X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + +/^\X{2,4}?X/utf,aftertext + \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X + 0+ + +/\X*Z/utf,no_start_optimize + A\x{300} +No match + +/\X*(.)/utf,no_start_optimize + A\x{1111}\x{ae4c}\x{1169} + 0: A\x{1111} + 1: \x{1111} + +# -------------------------------------------- + +/\x{1e9e}+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + +/[z\x{1e9e}]+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + +/\x{00df}+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + +/[z\x{00df}]+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + +/\x{1f88}+/i,utf + \x{1f88}\x{1f80} + 0: \x{1f88}\x{1f80} + +/[z\x{1f88}]+/i,utf + \x{1f88}\x{1f80} + 0: \x{1f88}\x{1f80} + +# Characters with more than one other case; test in classes + +/[z\x{00b5}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + +/[z\x{039c}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + +/[z\x{03bc}]+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + +/[z\x{00c5}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + +/[z\x{00e5}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + +/[z\x{212b}]+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + +/[z\x{01c4}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + +/[z\x{01c5}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + +/[z\x{01c6}]+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + +/[z\x{01c7}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + +/[z\x{01c8}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + +/[z\x{01c9}]+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + +/[z\x{01ca}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + +/[z\x{01cb}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + +/[z\x{01cc}]+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + +/[z\x{01f1}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + +/[z\x{01f2}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + +/[z\x{01f3}]+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + +/[z\x{0345}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/[z\x{0399}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/[z\x{03b9}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/[z\x{1fbe}]+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/[z\x{0392}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + +/[z\x{03b2}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + +/[z\x{03d0}]+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + +/[z\x{0395}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + +/[z\x{03b5}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + +/[z\x{03f5}]+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + +/[z\x{0398}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/[z\x{03b8}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/[z\x{03d1}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/[z\x{03f4}]+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/[z\x{039a}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + +/[z\x{03ba}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + +/[z\x{03f0}]+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + +/[z\x{03a0}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + +/[z\x{03c0}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + +/[z\x{03d6}]+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + +/[z\x{03a1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + +/[z\x{03c1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + +/[z\x{03f1}]+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + +/[z\x{03a3}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + +/[z\x{03c2}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + +/[z\x{03c3}]+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + +/[z\x{03a6}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + +/[z\x{03c6}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + +/[z\x{03d5}]+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + +/[z\x{03c9}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + +/[z\x{03a9}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + +/[z\x{2126}]+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + +/[z\x{1e60}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + +/[z\x{1e61}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + +/[z\x{1e9b}]+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + +# Perl 5.12.4 gets these wrong, but 5.15.3 is OK + +/[z\x{004b}]+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + +/[z\x{006b}]+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + +/[z\x{212a}]+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + +/[z\x{0053}]+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +/[z\x{0073}]+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +/[z\x{017f}]+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +# -------------------------------------- + +/(ΣΆΜΟΣ) \1/i,utf + ΣΆΜΟΣ ΣΆΜΟΣ + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + ΣΆΜΟΣ σάμος + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + σάμος σάμος + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + σάμος σάμοσ + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + σάμος ΣΆΜΟΣ + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + +/(σάμος) \1/i,utf + ΣΆΜΟΣ ΣΆΜΟΣ + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + ΣΆΜΟΣ σάμος + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + σάμος σάμος + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + σάμος σάμοσ + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + σάμος ΣΆΜΟΣ + 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + +/(ΣΆΜΟΣ) \1*/i,utf + ΣΆΜΟΣ\x20 + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος + 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} + 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} + +# Perl matches these + +/\x{00b5}+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + +/\x{039c}+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + +/\x{03bc}+/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + + +/\x{00c5}+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + +/\x{00e5}+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + +/\x{212b}+/i,utf + \x{00c5}\x{00e5}\x{212b} + 0: \x{c5}\x{e5}\x{212b} + + +/\x{01c4}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + +/\x{01c5}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + +/\x{01c6}+/i,utf + \x{01c4}\x{01c5}\x{01c6} + 0: \x{1c4}\x{1c5}\x{1c6} + + +/\x{01c7}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + +/\x{01c8}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + +/\x{01c9}+/i,utf + \x{01c7}\x{01c8}\x{01c9} + 0: \x{1c7}\x{1c8}\x{1c9} + + +/\x{01ca}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + +/\x{01cb}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + +/\x{01cc}+/i,utf + \x{01ca}\x{01cb}\x{01cc} + 0: \x{1ca}\x{1cb}\x{1cc} + + +/\x{01f1}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + +/\x{01f2}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + +/\x{01f3}+/i,utf + \x{01f1}\x{01f2}\x{01f3} + 0: \x{1f1}\x{1f2}\x{1f3} + + +/\x{0345}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/\x{0399}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/\x{03b9}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + +/\x{1fbe}+/i,utf + \x{0345}\x{0399}\x{03b9}\x{1fbe} + 0: \x{345}\x{399}\x{3b9}\x{1fbe} + + +/\x{0392}+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + +/\x{03b2}+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + +/\x{03d0}+/i,utf + \x{0392}\x{03b2}\x{03d0} + 0: \x{392}\x{3b2}\x{3d0} + + +/\x{0395}+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + +/\x{03b5}+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + +/\x{03f5}+/i,utf + \x{0395}\x{03b5}\x{03f5} + 0: \x{395}\x{3b5}\x{3f5} + + +/\x{0398}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/\x{03b8}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/\x{03d1}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + +/\x{03f4}+/i,utf + \x{0398}\x{03b8}\x{03d1}\x{03f4} + 0: \x{398}\x{3b8}\x{3d1}\x{3f4} + + +/\x{039a}+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + +/\x{03ba}+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + +/\x{03f0}+/i,utf + \x{039a}\x{03ba}\x{03f0} + 0: \x{39a}\x{3ba}\x{3f0} + + +/\x{03a0}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + +/\x{03c0}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + +/\x{03d6}+/i,utf + \x{03a0}\x{03c0}\x{03d6} + 0: \x{3a0}\x{3c0}\x{3d6} + + +/\x{03a1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + +/\x{03c1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + +/\x{03f1}+/i,utf + \x{03a1}\x{03c1}\x{03f1} + 0: \x{3a1}\x{3c1}\x{3f1} + + +/\x{03a3}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + +/\x{03c2}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + +/\x{03c3}+/i,utf + \x{03A3}\x{03C2}\x{03C3} + 0: \x{3a3}\x{3c2}\x{3c3} + + +/\x{03a6}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + +/\x{03c6}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + +/\x{03d5}+/i,utf + \x{03a6}\x{03c6}\x{03d5} + 0: \x{3a6}\x{3c6}\x{3d5} + + +/\x{03c9}+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + +/\x{03a9}+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + +/\x{2126}+/i,utf + \x{03c9}\x{03a9}\x{2126} + 0: \x{3c9}\x{3a9}\x{2126} + + +/\x{1e60}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + +/\x{1e61}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + +/\x{1e9b}+/i,utf + \x{1e60}\x{1e61}\x{1e9b} + 0: \x{1e60}\x{1e61}\x{1e9b} + + +/\x{1e9e}+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + +/\x{00df}+/i,utf + \x{1e9e}\x{00df} + 0: \x{1e9e}\x{df} + + +/\x{1f88}+/i,utf + \x{1f88}\x{1f80} + 0: \x{1f88}\x{1f80} + +/\x{1f80}+/i,utf + \x{1f88}\x{1f80} + 0: \x{1f88}\x{1f80} + +# Perl 5.12.4 gets these wrong, but 5.15.3 is OK + +/\x{004b}+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + +/\x{006b}+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + +/\x{212a}+/i,utf + \x{004b}\x{006b}\x{212a} + 0: Kk\x{212a} + + +/\x{0053}+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +/\x{0073}+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +/\x{017f}+/i,utf + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + +/^\p{Any}*\d{4}/utf + 1234 + 0: 1234 + 123 +No match + +/^\X*\w{4}/utf + 1234 + 0: 1234 + 123 +No match + +/^A\s+Z/utf,ucp + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/utf,ucp + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + +/^[[:graph:]]+$/utf,ucp + Letter:ABC + 0: Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + 0: Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + 0: Number:9\x{660} + Punctuation:\x{66a},; + 0: Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + 0: Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + 0: \x{feff} + \x{fff9}\x{fffa}\x{fffb} + 0: \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + 0: \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + 0: \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers +No match + \x{09} +No match + \x{0a} +No match + \x{1D} +No match + \x{20} +No match + \x{85} +No match + \x{a0} +No match + \x{61c} +No match + \x{1680} +No match + \x{180e} +No match + \x{2028} +No match + \x{2029} +No match + \x{202f} +No match + \x{2065} +No match + \x{2066} +No match + \x{2067} +No match + \x{2068} +No match + \x{2069} +No match + \x{3000} +No match + \x{e0002} +No match + \x{e001f} +No match + \x{e0080} +No match + +/^[[:print:]]+$/utf,ucp + Space: \x{a0} + 0: Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + 0: \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + 0: \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + 0: \x{202f}\x{205f} + \x{3000} + 0: \x{3000} + Letter:ABC + 0: Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + 0: Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + 0: Number:9\x{660} + Punctuation:\x{66a},; + 0: Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + 0: Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + 0: \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + 0: \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + 0: \x{feff} + \x{fff9}\x{fffa}\x{fffb} + 0: \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + 0: \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + 0: \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + 0: ** Failers + \x{09} +No match + \x{1D} +No match + \x{85} +No match + \x{61c} +No match + \x{2028} +No match + \x{2029} +No match + \x{2065} +No match + \x{2066} +No match + \x{2067} +No match + \x{2068} +No match + \x{2069} +No match + \x{e0002} +No match + \x{e001f} +No match + \x{e0080} +No match + +/^[[:punct:]]+$/utf,ucp + \$+<=>^`|~ + 0: $+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + 0: !"#%&'()*,-./:;?@[\]_{} + \x{a1}\x{a7} + 0: \x{a1}\x{a7} + \x{37e} + 0: \x{37e} + ** Failers +No match + abcde +No match + +/^[[:^graph:]]+$/utf,ucp + \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e} + 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}\x{180e} + \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + 0: \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + \x{3000}\x{e0002}\x{e001f}\x{e0080} + 0: \x{3000}\x{e0002}\x{e001f}\x{e0080} + ** Failers +No match + Letter:ABC +No match + Mark:\x{300}\x{1d172}\x{1d17b} +No match + Number:9\x{660} +No match + Punctuation:\x{66a},; +No match + Symbol:\x{6de}<>\x{fffc} +No match + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} +No match + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} +No match + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} +No match + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} +No match + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} +No match + \x{feff} +No match + \x{fff9}\x{fffa}\x{fffb} +No match + \x{110bd} +No match + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} +No match + \x{e0001} +No match + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} +No match + +/^[[:^print:]]+$/utf,ucp + \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + 0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + 0: \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + ** Failers +No match + Space: \x{a0} +No match + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} +No match + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} +No match + \x{202f}\x{205f} +No match + \x{3000} +No match + Letter:ABC +No match + Mark:\x{300}\x{1d172}\x{1d17b} +No match + Number:9\x{660} +No match + Punctuation:\x{66a},; +No match + Symbol:\x{6de}<>\x{fffc} +No match + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} +No match + \x{180e} +No match + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} +No match + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} +No match + \x{202f} +No match + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} +No match + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} +No match + \x{feff} +No match + \x{fff9}\x{fffa}\x{fffb} +No match + \x{110bd} +No match + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} +No match + \x{e0001} +No match + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} +No match + +/^[[:^punct:]]+$/utf,ucp + abcde + 0: abcde + ** Failers +No match + \$+<=>^`|~ +No match + !\"#%&'()*,-./:;?@[\\]_{} +No match + \x{a1}\x{a7} +No match + \x{37e} +No match + +/[RST]+/i,utf,ucp + Ss\x{17f} + 0: Ss\x{17f} + +/[R-T]+/i,utf,ucp + Ss\x{17f} + 0: Ss\x{17f} + +/[q-u]+/i,utf,ucp + Ss\x{17f} + 0: Ss\x{17f} + +/^s?c/im,utf + scat + 0: sc + +# End of testinput4