PCRE version 5.0 13-Sep-2004 /-- Do not use the \x{} construct except with patterns that have the --/ /-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/ No match /-- that option is set. However, the latest Perls recognize them always. --/ No match /a.b/8 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/8 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(.*?)(.)/8 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(.*)(.)/8 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(.)(.)/8 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(.?)(.)/8 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(.??)(.)/8 a\x{240}bcd 0: a\x{240} 1: 2: \x{240} /a(.{3})b/8 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/8 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/8 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/8 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/8 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}]/8 *** Failers No match \x{100} No match /(?<=aXb)cd/8 aXbcd 0: cd /(?<=a\x{100}b)cd/8 a\x{100}bcd 0: cd /(?<=a\x{100000}b)cd/8 a\x{100000}bcd 0: cd /(?:\x{100}){3}b/8 \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}/8 \x{ab} 0: \x{ab} \xc2\xab 0: \x{ab} *** Failers No match \x00{ab} No match /(?<=(.))X/8 WXYZ 0: X 1: W \x{256}XYZ 0: X 1: \x{256} *** Failers No match XYZ No match /X(\C{3})/8 X\x{1234} 0: X\x{1234} 1: \x{1234} /X(\C{4})/8 X\x{1234}YZ 0: X\x{1234}Y 1: \x{1234}Y /X\C*/8 XYZabcdce 0: XYZabcdce /X\C*?/8 XYZabcde 0: X /X\C{3,5}/8 Xabcdefg 0: Xabcde X\x{1234} 0: X\x{1234} X\x{1234}YZ 0: X\x{1234}YZ X\x{1234}\x{512} 0: X\x{1234}\x{512} X\x{1234}\x{512}YZ 0: X\x{1234}\x{512} /X\C{3,5}?/8 Xabcdefg 0: Xabc X\x{1234} 0: X\x{1234} X\x{1234}YZ 0: X\x{1234} X\x{1234}\x{512} 0: X\x{1234} /[^a]+/8g bcd 0: bcd \x{100}aY\x{256}Z 0: \x{100} 0: Y\x{256}Z /^[^a]{2}/8 \x{100}bc 0: \x{100}b /^[^a]{2,}/8 \x{100}bcAa 0: \x{100}bcA /^[^a]{2,}?/8 \x{100}bca 0: \x{100}b /[^a]+/8ig bcd 0: bcd \x{100}aY\x{256}Z 0: \x{100} 0: Y\x{256}Z /^[^a]{2}/8i \x{100}bc 0: \x{100}b /^[^a]{2,}/8i \x{100}bcAa 0: \x{100}bc /^[^a]{2,}?/8i \x{100}bca 0: \x{100}b /\x{100}{0,0}/8 abcd 0: /\x{100}?/8 abcd 0: \x{100}\x{100} 0: \x{100} /\x{100}{0,3}/8 \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}*/8 abce 0: \x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100}\x{100} /\x{100}{1,1}/8 abcd\x{100}\x{100}\x{100}\x{100} 0: \x{100} /\x{100}{1,3}/8 abcd\x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100} /\x{100}+/8 abcd\x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100}\x{100} /\x{100}{3}/8 abcd\x{100}\x{100}\x{100}XX 0: \x{100}\x{100}\x{100} /\x{100}{3,5}/8 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,}/8 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/8+ Xyyya\x{100}\x{100}bXzzz 0: X 0+ zzz /\D*/8 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /\D*/8 \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\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/8 1X2 0: X 1\x{100}2 0: \x{100} />\S/8 > >X Y 0: >X > >\x{100} Y 0: >\x{100} /\d/8 \x{100}3 0: 3 /\s/8 \x{100} X 0: /\D+/8 12abcd34 0: abcd *** Failers 0: *** Failers 1234 No match /\D{2,3}/8 12abcd34 0: abc 12ab34 0: ab *** Failers 0: *** 1234 No match 12a34 No match /\D{2,3}?/8 12abcd34 0: ab 12ab34 0: ab *** Failers 0: ** 1234 No match 12a34 No match /\d+/8 12abcd34 0: 12 *** Failers No match /\d{2,3}/8 12abcd34 0: 12 1234abcd 0: 123 *** Failers No match 1.4 No match /\d{2,3}?/8 12abcd34 0: 12 1234abcd 0: 12 *** Failers No match 1.4 No match /\S+/8 12abcd34 0: 12abcd34 *** Failers 0: *** \ \ No match /\S{2,3}/8 12abcd34 0: 12a 1234abcd 0: 123 *** Failers 0: *** \ \ No match /\S{2,3}?/8 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]/8 >\x{ff}< 0: \x{ff} /[^\xFF]/ XYZ 0: X /[^\xff]/8 XYZ 0: X \x{123} 0: \x{123} /^[ac]*b/8 xb No match /^[ac\x{100}]*b/8 xb No match /^[^x]*b/8i xb No match /^[^x]*b/8 xb No match /^\d*b/8 xb No match /(|a)/g8 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}$/8i \x{85} 0: \x{85} / End of testinput4 /