• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This set of tests is for UTF support, including Unicode properties. The
2# Unicode tests are all compatible with all versions of Perl >= 5.10, but
3# some of the property tests may differ because of different versions of
4# Unicode in use by PCRE2 and Perl.
5
6# WARNING: Use only / as the pattern delimiter. Although pcre2test supports
7# a number of delimiters, all those other than / give problems with the
8# perltest.sh script.
9
10#newline_default lf anycrlf any
11#perltest
12
13/a.b/utf
14    acb
15 0: acb
16    a\x7fb
17 0: a\x{7f}b
18    a\x{100}b
19 0: a\x{100}b
20\= Expect no match
21    a\nb
22No match
23
24/a(.{3})b/utf
25    a\x{4000}xyb
26 0: a\x{4000}xyb
27 1: \x{4000}xy
28    a\x{4000}\x7fyb
29 0: a\x{4000}\x{7f}yb
30 1: \x{4000}\x{7f}y
31    a\x{4000}\x{100}yb
32 0: a\x{4000}\x{100}yb
33 1: \x{4000}\x{100}y
34\= Expect no match
35    a\x{4000}b
36No match
37    ac\ncb
38No match
39
40/a(.*?)(.)/
41    a\xc0\x88b
42 0: a\xc0
43 1:
44 2: \xc0
45
46/a(.*?)(.)/utf
47    a\x{100}b
48 0: a\x{100}
49 1:
50 2: \x{100}
51
52/a(.*)(.)/
53    a\xc0\x88b
54 0: a\xc0\x88b
55 1: \xc0\x88
56 2: b
57
58/a(.*)(.)/utf
59    a\x{100}b
60 0: a\x{100}b
61 1: \x{100}
62 2: b
63
64/a(.)(.)/
65    a\xc0\x92bcd
66 0: a\xc0\x92
67 1: \xc0
68 2: \x92
69
70/a(.)(.)/utf
71    a\x{240}bcd
72 0: a\x{240}b
73 1: \x{240}
74 2: b
75
76/a(.?)(.)/
77    a\xc0\x92bcd
78 0: a\xc0\x92
79 1: \xc0
80 2: \x92
81
82/a(.?)(.)/utf
83    a\x{240}bcd
84 0: a\x{240}b
85 1: \x{240}
86 2: b
87
88/a(.??)(.)/
89    a\xc0\x92bcd
90 0: a\xc0
91 1:
92 2: \xc0
93
94/a(.??)(.)/utf
95    a\x{240}bcd
96 0: a\x{240}
97 1:
98 2: \x{240}
99
100/a(.{3})b/utf
101    a\x{1234}xyb
102 0: a\x{1234}xyb
103 1: \x{1234}xy
104    a\x{1234}\x{4321}yb
105 0: a\x{1234}\x{4321}yb
106 1: \x{1234}\x{4321}y
107    a\x{1234}\x{4321}\x{3412}b
108 0: a\x{1234}\x{4321}\x{3412}b
109 1: \x{1234}\x{4321}\x{3412}
110\= Expect no match
111    a\x{1234}b
112No match
113    ac\ncb
114No match
115
116/a(.{3,})b/utf
117    a\x{1234}xyb
118 0: a\x{1234}xyb
119 1: \x{1234}xy
120    a\x{1234}\x{4321}yb
121 0: a\x{1234}\x{4321}yb
122 1: \x{1234}\x{4321}y
123    a\x{1234}\x{4321}\x{3412}b
124 0: a\x{1234}\x{4321}\x{3412}b
125 1: \x{1234}\x{4321}\x{3412}
126    axxxxbcdefghijb
127 0: axxxxbcdefghijb
128 1: xxxxbcdefghij
129    a\x{1234}\x{4321}\x{3412}\x{3421}b
130 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
131 1: \x{1234}\x{4321}\x{3412}\x{3421}
132\= Expect no match
133    a\x{1234}b
134No match
135
136/a(.{3,}?)b/utf
137    a\x{1234}xyb
138 0: a\x{1234}xyb
139 1: \x{1234}xy
140    a\x{1234}\x{4321}yb
141 0: a\x{1234}\x{4321}yb
142 1: \x{1234}\x{4321}y
143    a\x{1234}\x{4321}\x{3412}b
144 0: a\x{1234}\x{4321}\x{3412}b
145 1: \x{1234}\x{4321}\x{3412}
146    axxxxbcdefghijb
147 0: axxxxb
148 1: xxxx
149    a\x{1234}\x{4321}\x{3412}\x{3421}b
150 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
151 1: \x{1234}\x{4321}\x{3412}\x{3421}
152\= Expect no match
153    a\x{1234}b
154No match
155
156/a(.{3,5})b/utf
157    a\x{1234}xyb
158 0: a\x{1234}xyb
159 1: \x{1234}xy
160    a\x{1234}\x{4321}yb
161 0: a\x{1234}\x{4321}yb
162 1: \x{1234}\x{4321}y
163    a\x{1234}\x{4321}\x{3412}b
164 0: a\x{1234}\x{4321}\x{3412}b
165 1: \x{1234}\x{4321}\x{3412}
166    axxxxbcdefghijb
167 0: axxxxb
168 1: xxxx
169    a\x{1234}\x{4321}\x{3412}\x{3421}b
170 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
171 1: \x{1234}\x{4321}\x{3412}\x{3421}
172    axbxxbcdefghijb
173 0: axbxxb
174 1: xbxx
175    axxxxxbcdefghijb
176 0: axxxxxb
177 1: xxxxx
178\= Expect no match
179    a\x{1234}b
180No match
181    axxxxxxbcdefghijb
182No match
183
184/a(.{3,5}?)b/utf
185    a\x{1234}xyb
186 0: a\x{1234}xyb
187 1: \x{1234}xy
188    a\x{1234}\x{4321}yb
189 0: a\x{1234}\x{4321}yb
190 1: \x{1234}\x{4321}y
191    a\x{1234}\x{4321}\x{3412}b
192 0: a\x{1234}\x{4321}\x{3412}b
193 1: \x{1234}\x{4321}\x{3412}
194    axxxxbcdefghijb
195 0: axxxxb
196 1: xxxx
197    a\x{1234}\x{4321}\x{3412}\x{3421}b
198 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
199 1: \x{1234}\x{4321}\x{3412}\x{3421}
200    axbxxbcdefghijb
201 0: axbxxb
202 1: xbxx
203    axxxxxbcdefghijb
204 0: axxxxxb
205 1: xxxxx
206\= Expect no match
207    a\x{1234}b
208No match
209    axxxxxxbcdefghijb
210No match
211
212/^[a\x{c0}]/utf
213\= Expect no match
214    \x{100}
215No match
216
217/(?<=aXb)cd/utf
218    aXbcd
219 0: cd
220
221/(?<=a\x{100}b)cd/utf
222    a\x{100}bcd
223 0: cd
224
225/(?<=a\x{100000}b)cd/utf
226    a\x{100000}bcd
227 0: cd
228
229/(?:\x{100}){3}b/utf
230    \x{100}\x{100}\x{100}b
231 0: \x{100}\x{100}\x{100}b
232\= Expect no match
233    \x{100}\x{100}b
234No match
235
236/\x{ab}/utf
237    \x{ab}
238 0: \x{ab}
239    \xc2\xab
240 0: \x{ab}
241\= Expect no match
242    \x00{ab}
243No match
244
245/(?<=(.))X/utf
246    WXYZ
247 0: X
248 1: W
249    \x{256}XYZ
250 0: X
251 1: \x{256}
252\= Expect no match
253    XYZ
254No match
255
256/[^a]+/g,utf
257    bcd
258 0: bcd
259    \x{100}aY\x{256}Z
260 0: \x{100}
261 0: Y\x{256}Z
262
263/^[^a]{2}/utf
264    \x{100}bc
265 0: \x{100}b
266
267/^[^a]{2,}/utf
268    \x{100}bcAa
269 0: \x{100}bcA
270
271/^[^a]{2,}?/utf
272    \x{100}bca
273 0: \x{100}b
274
275/[^a]+/gi,utf
276    bcd
277 0: bcd
278    \x{100}aY\x{256}Z
279 0: \x{100}
280 0: Y\x{256}Z
281
282/^[^a]{2}/i,utf
283    \x{100}bc
284 0: \x{100}b
285
286/^[^a]{2,}/i,utf
287    \x{100}bcAa
288 0: \x{100}bc
289
290/^[^a]{2,}?/i,utf
291    \x{100}bca
292 0: \x{100}b
293
294/\x{100}{0,0}/utf
295    abcd
296 0:
297
298/\x{100}?/utf
299    abcd
300 0:
301    \x{100}\x{100}
302 0: \x{100}
303
304/\x{100}{0,3}/utf
305    \x{100}\x{100}
306 0: \x{100}\x{100}
307    \x{100}\x{100}\x{100}\x{100}
308 0: \x{100}\x{100}\x{100}
309
310/\x{100}*/utf
311    abce
312 0:
313    \x{100}\x{100}\x{100}\x{100}
314 0: \x{100}\x{100}\x{100}\x{100}
315
316/\x{100}{1,1}/utf
317    abcd\x{100}\x{100}\x{100}\x{100}
318 0: \x{100}
319
320/\x{100}{1,3}/utf
321    abcd\x{100}\x{100}\x{100}\x{100}
322 0: \x{100}\x{100}\x{100}
323
324/\x{100}+/utf
325    abcd\x{100}\x{100}\x{100}\x{100}
326 0: \x{100}\x{100}\x{100}\x{100}
327
328/\x{100}{3}/utf
329    abcd\x{100}\x{100}\x{100}XX
330 0: \x{100}\x{100}\x{100}
331
332/\x{100}{3,5}/utf
333    abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
334 0: \x{100}\x{100}\x{100}\x{100}\x{100}
335
336/\x{100}{3,}/utf
337    abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
338 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
339
340/(?<=a\x{100}{2}b)X/utf,aftertext
341    Xyyya\x{100}\x{100}bXzzz
342 0: X
343 0+ zzz
344
345/\D*/utf
346  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
347 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
348
349/\D*/utf
350  \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
351 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}
352
353/\D/utf
354    1X2
355 0: X
356    1\x{100}2
357 0: \x{100}
358
359/>\S/utf
360    > >X Y
361 0: >X
362    > >\x{100} Y
363 0: >\x{100}
364
365/\d/utf
366    \x{100}3
367 0: 3
368
369/\s/utf
370    \x{100} X
371 0:
372
373/\D+/utf
374    12abcd34
375 0: abcd
376\= Expect no match
377    1234
378No match
379
380/\D{2,3}/utf
381    12abcd34
382 0: abc
383    12ab34
384 0: ab
385\= Expect no match
386    1234
387No match
388    12a34
389No match
390
391/\D{2,3}?/utf
392    12abcd34
393 0: ab
394    12ab34
395 0: ab
396\= Expect no match
397    1234
398No match
399    12a34
400No match
401
402/\d+/utf
403    12abcd34
404 0: 12
405
406/\d{2,3}/utf
407    12abcd34
408 0: 12
409    1234abcd
410 0: 123
411\= Expect no match
412    1.4
413No match
414
415/\d{2,3}?/utf
416    12abcd34
417 0: 12
418    1234abcd
419 0: 12
420\= Expect no match
421    1.4
422No match
423
424/\S+/utf
425    12abcd34
426 0: 12abcd34
427\= Expect no match
428    \    \
429No match
430
431/\S{2,3}/utf
432    12abcd34
433 0: 12a
434    1234abcd
435 0: 123
436\= Expect no match
437    \     \
438No match
439
440/\S{2,3}?/utf
441    12abcd34
442 0: 12
443    1234abcd
444 0: 12
445\= Expect no match
446    \     \
447No match
448
449/>\s+</utf,aftertext
450    12>      <34
451 0: >      <
452 0+ 34
453
454/>\s{2,3}</utf,aftertext
455    ab>  <cd
456 0: >  <
457 0+ cd
458    ab>   <ce
459 0: >   <
460 0+ ce
461\= Expect no match
462    ab>    <cd
463No match
464
465/>\s{2,3}?</utf,aftertext
466    ab>  <cd
467 0: >  <
468 0+ cd
469    ab>   <ce
470 0: >   <
471 0+ ce
472\= Expect no match
473    ab>    <cd
474No match
475
476/\w+/utf
477    12      34
478 0: 12
479\= Expect no match
480    +++=*!
481No match
482
483/\w{2,3}/utf
484    ab  cd
485 0: ab
486    abcd ce
487 0: abc
488\= Expect no match
489    a.b.c
490No match
491
492/\w{2,3}?/utf
493    ab  cd
494 0: ab
495    abcd ce
496 0: ab
497\= Expect no match
498    a.b.c
499No match
500
501/\W+/utf
502    12====34
503 0: ====
504\= Expect no match
505    abcd
506No match
507
508/\W{2,3}/utf
509    ab====cd
510 0: ===
511    ab==cd
512 0: ==
513\= Expect no match
514    a.b.c
515No match
516
517/\W{2,3}?/utf
518    ab====cd
519 0: ==
520    ab==cd
521 0: ==
522\= Expect no match
523    a.b.c
524No match
525
526/[\x{100}]/utf
527    \x{100}
528 0: \x{100}
529    Z\x{100}
530 0: \x{100}
531    \x{100}Z
532 0: \x{100}
533
534/[Z\x{100}]/utf
535    Z\x{100}
536 0: Z
537    \x{100}
538 0: \x{100}
539    \x{100}Z
540 0: \x{100}
541
542/[\x{100}\x{200}]/utf
543    ab\x{100}cd
544 0: \x{100}
545    ab\x{200}cd
546 0: \x{200}
547
548/[\x{100}-\x{200}]/utf
549    ab\x{100}cd
550 0: \x{100}
551    ab\x{200}cd
552 0: \x{200}
553    ab\x{111}cd
554 0: \x{111}
555
556/[z-\x{200}]/utf
557    ab\x{100}cd
558 0: \x{100}
559    ab\x{200}cd
560 0: \x{200}
561    ab\x{111}cd
562 0: \x{111}
563    abzcd
564 0: z
565    ab|cd
566 0: |
567
568/[Q\x{100}\x{200}]/utf
569    ab\x{100}cd
570 0: \x{100}
571    ab\x{200}cd
572 0: \x{200}
573    Q?
574 0: Q
575
576/[Q\x{100}-\x{200}]/utf
577    ab\x{100}cd
578 0: \x{100}
579    ab\x{200}cd
580 0: \x{200}
581    ab\x{111}cd
582 0: \x{111}
583    Q?
584 0: Q
585
586/[Qz-\x{200}]/utf
587    ab\x{100}cd
588 0: \x{100}
589    ab\x{200}cd
590 0: \x{200}
591    ab\x{111}cd
592 0: \x{111}
593    abzcd
594 0: z
595    ab|cd
596 0: |
597    Q?
598 0: Q
599
600/[\x{100}\x{200}]{1,3}/utf
601    ab\x{100}cd
602 0: \x{100}
603    ab\x{200}cd
604 0: \x{200}
605    ab\x{200}\x{100}\x{200}\x{100}cd
606 0: \x{200}\x{100}\x{200}
607
608/[\x{100}\x{200}]{1,3}?/utf
609    ab\x{100}cd
610 0: \x{100}
611    ab\x{200}cd
612 0: \x{200}
613    ab\x{200}\x{100}\x{200}\x{100}cd
614 0: \x{200}
615
616/[Q\x{100}\x{200}]{1,3}/utf
617    ab\x{100}cd
618 0: \x{100}
619    ab\x{200}cd
620 0: \x{200}
621    ab\x{200}\x{100}\x{200}\x{100}cd
622 0: \x{200}\x{100}\x{200}
623
624/[Q\x{100}\x{200}]{1,3}?/utf
625    ab\x{100}cd
626 0: \x{100}
627    ab\x{200}cd
628 0: \x{200}
629    ab\x{200}\x{100}\x{200}\x{100}cd
630 0: \x{200}
631
632/(?<=[\x{100}\x{200}])X/utf
633    abc\x{200}X
634 0: X
635    abc\x{100}X
636 0: X
637\= Expect no match
638    X
639No match
640
641/(?<=[Q\x{100}\x{200}])X/utf
642    abc\x{200}X
643 0: X
644    abc\x{100}X
645 0: X
646    abQX
647 0: X
648\= Expect no match
649    X
650No match
651
652/(?<=[\x{100}\x{200}]{3})X/utf
653    abc\x{100}\x{200}\x{100}X
654 0: X
655\= Expect no match
656    abc\x{200}X
657No match
658    X
659No match
660
661/[^\x{100}\x{200}]X/utf
662    AX
663 0: AX
664    \x{150}X
665 0: \x{150}X
666    \x{500}X
667 0: \x{500}X
668\= Expect no match
669    \x{100}X
670No match
671    \x{200}X
672No match
673
674/[^Q\x{100}\x{200}]X/utf
675    AX
676 0: AX
677    \x{150}X
678 0: \x{150}X
679    \x{500}X
680 0: \x{500}X
681\= Expect no match
682    \x{100}X
683No match
684    \x{200}X
685No match
686    QX
687No match
688
689/[^\x{100}-\x{200}]X/utf
690    AX
691 0: AX
692    \x{500}X
693 0: \x{500}X
694\= Expect no match
695    \x{100}X
696No match
697    \x{150}X
698No match
699    \x{200}X
700No match
701
702/[z-\x{100}]/i,utf
703    z
704 0: z
705    Z
706 0: Z
707    \x{100}
708 0: \x{100}
709\= Expect no match
710    \x{102}
711No match
712    y
713No match
714
715/[\xFF]/
716    >\xff<
717 0: \xff
718
719/[\xff]/utf
720    >\x{ff}<
721 0: \x{ff}
722
723/[^\xFF]/
724    XYZ
725 0: X
726
727/[^\xff]/utf
728    XYZ
729 0: X
730    \x{123}
731 0: \x{123}
732
733/^[ac]*b/utf
734\= Expect no match
735  xb
736No match
737
738/^[ac\x{100}]*b/utf
739\= Expect no match
740  xb
741No match
742
743/^[^x]*b/i,utf
744\= Expect no match
745  xb
746No match
747
748/^[^x]*b/utf
749\= Expect no match
750  xb
751No match
752
753/^\d*b/utf
754\= Expect no match
755  xb
756No match
757
758/(|a)/g,utf
759    catac
760 0:
761 1:
762 0:
763 1:
764 0: a
765 1: a
766 0:
767 1:
768 0:
769 1:
770 0: a
771 1: a
772 0:
773 1:
774 0:
775 1:
776    a\x{256}a
777 0:
778 1:
779 0: a
780 1: a
781 0:
782 1:
783 0:
784 1:
785 0: a
786 1: a
787 0:
788 1:
789
790/^\x{85}$/i,utf
791    \x{85}
792 0: \x{85}
793
794/^ሴ/utf
795796 0: \x{1234}
797
798/^\ሴ/utf
799800 0: \x{1234}
801
802/(?s)(.{1,5})/utf
803    abcdefg
804 0: abcde
805 1: abcde
806    ab
807 0: ab
808 1: ab
809
810/a*\x{100}*\w/utf
811    a
812 0: a
813
814/\S\S/g,utf
815    A\x{a3}BC
816 0: A\x{a3}
817 0: BC
818
819/\S{2}/g,utf
820    A\x{a3}BC
821 0: A\x{a3}
822 0: BC
823
824/\W\W/g,utf
825    +\x{a3}==
826 0: +\x{a3}
827 0: ==
828
829/\W{2}/g,utf
830    +\x{a3}==
831 0: +\x{a3}
832 0: ==
833
834/\S/g,utf
835    \x{442}\x{435}\x{441}\x{442}
836 0: \x{442}
837 0: \x{435}
838 0: \x{441}
839 0: \x{442}
840
841/[\S]/g,utf
842    \x{442}\x{435}\x{441}\x{442}
843 0: \x{442}
844 0: \x{435}
845 0: \x{441}
846 0: \x{442}
847
848/\D/g,utf
849    \x{442}\x{435}\x{441}\x{442}
850 0: \x{442}
851 0: \x{435}
852 0: \x{441}
853 0: \x{442}
854
855/[\D]/g,utf
856    \x{442}\x{435}\x{441}\x{442}
857 0: \x{442}
858 0: \x{435}
859 0: \x{441}
860 0: \x{442}
861
862/\W/g,utf
863    \x{2442}\x{2435}\x{2441}\x{2442}
864 0: \x{2442}
865 0: \x{2435}
866 0: \x{2441}
867 0: \x{2442}
868
869/[\W]/g,utf
870    \x{2442}\x{2435}\x{2441}\x{2442}
871 0: \x{2442}
872 0: \x{2435}
873 0: \x{2441}
874 0: \x{2442}
875
876/[\S\s]*/utf
877    abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
878 0: abc\x{0a}\x{0d}\x{442}\x{435}\x{441}\x{442}xyz
879
880/[\x{41f}\S]/g,utf
881    \x{442}\x{435}\x{441}\x{442}
882 0: \x{442}
883 0: \x{435}
884 0: \x{441}
885 0: \x{442}
886
887/.[^\S]./g,utf
888    abc def\x{442}\x{443}xyz\npqr
889 0: c d
890 0: z\x{0a}p
891
892/.[^\S\n]./g,utf
893    abc def\x{442}\x{443}xyz\npqr
894 0: c d
895
896/[[:^alnum:]]/g,utf
897    +\x{2442}
898 0: +
899 0: \x{2442}
900
901/[[:^alpha:]]/g,utf
902    +\x{2442}
903 0: +
904 0: \x{2442}
905
906/[[:^ascii:]]/g,utf
907    A\x{442}
908 0: \x{442}
909
910/[[:^blank:]]/g,utf
911    A\x{442}
912 0: A
913 0: \x{442}
914
915/[[:^cntrl:]]/g,utf
916    A\x{442}
917 0: A
918 0: \x{442}
919
920/[[:^digit:]]/g,utf
921    A\x{442}
922 0: A
923 0: \x{442}
924
925/[[:^graph:]]/g,utf
926    \x19\x{e01ff}
927 0: \x{19}
928 0: \x{e01ff}
929
930/[[:^lower:]]/g,utf
931    A\x{422}
932 0: A
933 0: \x{422}
934
935/[[:^print:]]/g,utf
936    \x{19}\x{e01ff}
937 0: \x{19}
938 0: \x{e01ff}
939
940/[[:^punct:]]/g,utf
941    A\x{442}
942 0: A
943 0: \x{442}
944
945/[[:^space:]]/g,utf
946    A\x{442}
947 0: A
948 0: \x{442}
949
950/[[:^upper:]]/g,utf
951    a\x{442}
952 0: a
953 0: \x{442}
954
955/[[:^word:]]/g,utf
956    +\x{2442}
957 0: +
958 0: \x{2442}
959
960/[[:^xdigit:]]/g,utf
961    M\x{442}
962 0: M
963 0: \x{442}
964
965/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d_^]/utf
966
967/^[^d]*?$/
968    abc
969 0: abc
970
971/^[^d]*?$/utf
972    abc
973 0: abc
974
975/^[^d]*?$/i
976    abc
977 0: abc
978
979/^[^d]*?$/i,utf
980    abc
981 0: abc
982
983/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/utf
984
985/^[a\x{c0}]b/utf
986    \x{c0}b
987 0: \x{c0}b
988
989/^([a\x{c0}]*?)aa/utf
990    a\x{c0}aaaa/
991 0: a\x{c0}aa
992 1: a\x{c0}
993
994/^([a\x{c0}]*?)aa/utf
995    a\x{c0}aaaa/
996 0: a\x{c0}aa
997 1: a\x{c0}
998    a\x{c0}a\x{c0}aaa/
999 0: a\x{c0}a\x{c0}aa
1000 1: a\x{c0}a\x{c0}
1001
1002/^([a\x{c0}]*)aa/utf
1003    a\x{c0}aaaa/
1004 0: a\x{c0}aaaa
1005 1: a\x{c0}aa
1006    a\x{c0}a\x{c0}aaa/
1007 0: a\x{c0}a\x{c0}aaa
1008 1: a\x{c0}a\x{c0}a
1009
1010/^([a\x{c0}]*)a\x{c0}/utf
1011    a\x{c0}aaaa/
1012 0: a\x{c0}
1013 1:
1014    a\x{c0}a\x{c0}aaa/
1015 0: a\x{c0}a\x{c0}
1016 1: a\x{c0}
1017
1018/A*/g,utf
1019    AAB\x{123}BAA
1020 0: AA
1021 0:
1022 0:
1023 0:
1024 0: AA
1025 0:
1026
1027/(abc)\1/i,utf
1028\= Expect no match
1029   abc
1030No match
1031
1032/(abc)\1/utf
1033\= Expect no match
1034   abc
1035No match
1036
1037/a(*:a\x{1234}b)/utf,mark
1038    abc
1039 0: a
1040MK: a\x{1234}b
1041
1042/a(*:a£b)/utf,mark
1043    abc
1044 0: a
1045MK: a\x{a3}b
1046
1047# Noncharacters
1048
1049/./utf
1050    \x{fffe}
1051 0: \x{fffe}
1052    \x{ffff}
1053 0: \x{ffff}
1054    \x{1fffe}
1055 0: \x{1fffe}
1056    \x{1ffff}
1057 0: \x{1ffff}
1058    \x{2fffe}
1059 0: \x{2fffe}
1060    \x{2ffff}
1061 0: \x{2ffff}
1062    \x{3fffe}
1063 0: \x{3fffe}
1064    \x{3ffff}
1065 0: \x{3ffff}
1066    \x{4fffe}
1067 0: \x{4fffe}
1068    \x{4ffff}
1069 0: \x{4ffff}
1070    \x{5fffe}
1071 0: \x{5fffe}
1072    \x{5ffff}
1073 0: \x{5ffff}
1074    \x{6fffe}
1075 0: \x{6fffe}
1076    \x{6ffff}
1077 0: \x{6ffff}
1078    \x{7fffe}
1079 0: \x{7fffe}
1080    \x{7ffff}
1081 0: \x{7ffff}
1082    \x{8fffe}
1083 0: \x{8fffe}
1084    \x{8ffff}
1085 0: \x{8ffff}
1086    \x{9fffe}
1087 0: \x{9fffe}
1088    \x{9ffff}
1089 0: \x{9ffff}
1090    \x{afffe}
1091 0: \x{afffe}
1092    \x{affff}
1093 0: \x{affff}
1094    \x{bfffe}
1095 0: \x{bfffe}
1096    \x{bffff}
1097 0: \x{bffff}
1098    \x{cfffe}
1099 0: \x{cfffe}
1100    \x{cffff}
1101 0: \x{cffff}
1102    \x{dfffe}
1103 0: \x{dfffe}
1104    \x{dffff}
1105 0: \x{dffff}
1106    \x{efffe}
1107 0: \x{efffe}
1108    \x{effff}
1109 0: \x{effff}
1110    \x{ffffe}
1111 0: \x{ffffe}
1112    \x{fffff}
1113 0: \x{fffff}
1114    \x{10fffe}
1115 0: \x{10fffe}
1116    \x{10ffff}
1117 0: \x{10ffff}
1118    \x{fdd0}
1119 0: \x{fdd0}
1120    \x{fdd1}
1121 0: \x{fdd1}
1122    \x{fdd2}
1123 0: \x{fdd2}
1124    \x{fdd3}
1125 0: \x{fdd3}
1126    \x{fdd4}
1127 0: \x{fdd4}
1128    \x{fdd5}
1129 0: \x{fdd5}
1130    \x{fdd6}
1131 0: \x{fdd6}
1132    \x{fdd7}
1133 0: \x{fdd7}
1134    \x{fdd8}
1135 0: \x{fdd8}
1136    \x{fdd9}
1137 0: \x{fdd9}
1138    \x{fdda}
1139 0: \x{fdda}
1140    \x{fddb}
1141 0: \x{fddb}
1142    \x{fddc}
1143 0: \x{fddc}
1144    \x{fddd}
1145 0: \x{fddd}
1146    \x{fdde}
1147 0: \x{fdde}
1148    \x{fddf}
1149 0: \x{fddf}
1150    \x{fde0}
1151 0: \x{fde0}
1152    \x{fde1}
1153 0: \x{fde1}
1154    \x{fde2}
1155 0: \x{fde2}
1156    \x{fde3}
1157 0: \x{fde3}
1158    \x{fde4}
1159 0: \x{fde4}
1160    \x{fde5}
1161 0: \x{fde5}
1162    \x{fde6}
1163 0: \x{fde6}
1164    \x{fde7}
1165 0: \x{fde7}
1166    \x{fde8}
1167 0: \x{fde8}
1168    \x{fde9}
1169 0: \x{fde9}
1170    \x{fdea}
1171 0: \x{fdea}
1172    \x{fdeb}
1173 0: \x{fdeb}
1174    \x{fdec}
1175 0: \x{fdec}
1176    \x{fded}
1177 0: \x{fded}
1178    \x{fdee}
1179 0: \x{fdee}
1180    \x{fdef}
1181 0: \x{fdef}
1182
1183/^\d*\w{4}/utf
1184    1234
1185 0: 1234
1186\= Expect no match
1187    123
1188No match
1189
1190/^[^b]*\w{4}/utf
1191    aaaa
1192 0: aaaa
1193\= Expect no match
1194    aaa
1195No match
1196
1197/^[^b]*\w{4}/i,utf
1198    aaaa
1199 0: aaaa
1200\= Expect no match
1201    aaa
1202No match
1203
1204/^\x{100}*.{4}/utf
1205    \x{100}\x{100}\x{100}\x{100}
1206 0: \x{100}\x{100}\x{100}\x{100}
1207\= Expect no match
1208    \x{100}\x{100}\x{100}
1209No match
1210
1211/^\x{100}*.{4}/i,utf
1212    \x{100}\x{100}\x{100}\x{100}
1213 0: \x{100}\x{100}\x{100}\x{100}
1214\= Expect no match
1215    \x{100}\x{100}\x{100}
1216No match
1217
1218/^a+[a\x{200}]/utf
1219    aa
1220 0: aa
1221
1222/^.\B.\B./utf
1223    \x{10123}\x{10124}\x{10125}
1224 0: \x{10123}\x{10124}\x{10125}
1225
1226/^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/utf
1227    #\x{10000}#\x{100}#\x{10ffff}#
1228 0: #\x{10000}#\x{100}#\x{10ffff}#
1229
1230# Unicode property support tests
1231
1232/^\pC\pL\pM\pN\pP\pS\pZ</utf
1233    \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
1234 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
1235    \np\x{300}9!\$ <
1236 0: \x{0a}p\x{300}9!$ <
1237\= Expect no match
1238    ap\x{300}9!\$ <
1239No match
1240
1241/^\PC/utf
1242    X
1243 0: X
1244\= Expect no match
1245    \x7f
1246No match
1247
1248/^\PL/utf
1249    9
1250 0: 9
1251\= Expect no match
1252    \x{c0}
1253No match
1254
1255/^\PM/utf
1256    X
1257 0: X
1258\= Expect no match
1259    \x{30f}
1260No match
1261
1262/^\PN/utf
1263    X
1264 0: X
1265\= Expect no match
1266    \x{660}
1267No match
1268
1269/^\PP/utf
1270    X
1271 0: X
1272\= Expect no match
1273    \x{66c}
1274No match
1275
1276/^\PS/utf
1277    X
1278 0: X
1279\= Expect no match
1280    \x{f01}
1281No match
1282
1283/^\PZ/utf
1284    X
1285 0: X
1286\= Expect no match
1287    \x{1680}
1288No match
1289
1290/^\p{Cc}/utf
1291    \x{017}
1292 0: \x{17}
1293    \x{09f}
1294 0: \x{9f}
1295\= Expect no match
1296    \x{0600}
1297No match
1298
1299/^\p{Cf}/utf
1300    \x{601}
1301 0: \x{601}
1302\= Expect no match
1303    \x{09f}
1304No match
1305
1306/^\p{Cn}/utf
1307    \x{e0000}
1308 0: \x{e0000}
1309\= Expect no match
1310    \x{09f}
1311No match
1312
1313/^\p{Co}/utf
1314    \x{f8ff}
1315 0: \x{f8ff}
1316\= Expect no match
1317    \x{09f}
1318No match
1319
1320/^\p{Ll}/utf
1321    a
1322 0: a
1323\= Expect no match
1324    Z
1325No match
1326    \x{e000}
1327No match
1328
1329/^\p{Lm}/utf
1330    \x{2b0}
1331 0: \x{2b0}
1332\= Expect no match
1333    a
1334No match
1335
1336/^\p{Lo}/utf
1337    \x{1bb}
1338 0: \x{1bb}
1339    \x{3400}
1340 0: \x{3400}
1341    \x{3401}
1342 0: \x{3401}
1343    \x{4d00}
1344 0: \x{4d00}
1345    \x{4db4}
1346 0: \x{4db4}
1347    \x{4db5}
1348 0: \x{4db5}
1349    \x{4db6}
1350 0: \x{4db6}
1351\= Expect no match
1352    a
1353No match
1354    \x{2b0}
1355No match
1356
1357/^\p{Lt}/utf
1358    \x{1c5}
1359 0: \x{1c5}
1360\= Expect no match
1361    a
1362No match
1363    \x{2b0}
1364No match
1365
1366/^\p{Lu}/utf
1367    A
1368 0: A
1369\= Expect no match
1370    \x{2b0}
1371No match
1372
1373/^\p{Mc}/utf
1374    \x{903}
1375 0: \x{903}
1376\= Expect no match
1377    X
1378No match
1379    \x{300}
1380No match
1381
1382/^\p{Me}/utf
1383    \x{488}
1384 0: \x{488}
1385\= Expect no match
1386    X
1387No match
1388    \x{903}
1389No match
1390    \x{300}
1391No match
1392
1393/^\p{Mn}/utf
1394    \x{300}
1395 0: \x{300}
1396\= Expect no match
1397    X
1398No match
1399    \x{903}
1400No match
1401
1402/^\p{Nd}+/utf
1403    0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
1404 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
1405    \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
1406 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
1407    \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
1408 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
1409\= Expect no match
1410    X
1411No match
1412
1413/^\p{Nl}/utf
1414    \x{16ee}
1415 0: \x{16ee}
1416\= Expect no match
1417    X
1418No match
1419    \x{966}
1420No match
1421
1422/^\p{No}/utf
1423    \x{b2}
1424 0: \x{b2}
1425    \x{b3}
1426 0: \x{b3}
1427\= Expect no match
1428    X
1429No match
1430    \x{16ee}
1431No match
1432
1433/^\p{Pc}/utf
1434    \x5f
1435 0: _
1436    \x{203f}
1437 0: \x{203f}
1438\= Expect no match
1439    X
1440No match
1441    -
1442No match
1443    \x{58a}
1444No match
1445
1446/^\p{Pd}/utf
1447    -
1448 0: -
1449    \x{58a}
1450 0: \x{58a}
1451\= Expect no match
1452    X
1453No match
1454    \x{203f}
1455No match
1456
1457/^\p{Pe}/utf
1458    )
1459 0: )
1460    ]
1461 0: ]
1462    }
1463 0: }
1464    \x{f3b}
1465 0: \x{f3b}
1466\= Expect no match
1467    X
1468No match
1469    \x{203f}
1470No match
1471    (
1472No match
1473    [
1474No match
1475    {
1476No match
1477    \x{f3c}
1478No match
1479
1480/^\p{Pf}/utf
1481    \x{bb}
1482 0: \x{bb}
1483    \x{2019}
1484 0: \x{2019}
1485\= Expect no match
1486    X
1487No match
1488    \x{203f}
1489No match
1490
1491/^\p{Pi}/utf
1492    \x{ab}
1493 0: \x{ab}
1494    \x{2018}
1495 0: \x{2018}
1496\= Expect no match
1497    X
1498No match
1499    \x{203f}
1500No match
1501
1502/^\p{Po}/utf
1503    !
1504 0: !
1505    \x{37e}
1506 0: \x{37e}
1507\= Expect no match
1508    X
1509No match
1510    \x{203f}
1511No match
1512
1513/^\p{Ps}/utf
1514    (
1515 0: (
1516    [
1517 0: [
1518    {
1519 0: {
1520    \x{f3c}
1521 0: \x{f3c}
1522\= Expect no match
1523    X
1524No match
1525    )
1526No match
1527    ]
1528No match
1529    }
1530No match
1531    \x{f3b}
1532No match
1533
1534/^\p{Sk}/utf
1535    \x{2c2}
1536 0: \x{2c2}
1537\= Expect no match
1538    X
1539No match
1540    \x{9f2}
1541No match
1542
1543/^\p{Sm}+/utf
1544    +<|~\x{ac}\x{2044}
1545 0: +<|~\x{ac}\x{2044}
1546\= Expect no match
1547    X
1548No match
1549    \x{9f2}
1550No match
1551
1552/^\p{So}/utf
1553    \x{a6}
1554 0: \x{a6}
1555    \x{482}
1556 0: \x{482}
1557\= Expect no match
1558    X
1559No match
1560    \x{9f2}
1561No match
1562
1563/^\p{Zl}/utf
1564    \x{2028}
1565 0: \x{2028}
1566\= Expect no match
1567    X
1568No match
1569    \x{2029}
1570No match
1571
1572/^\p{Zp}/utf
1573    \x{2029}
1574 0: \x{2029}
1575\= Expect no match
1576    X
1577No match
1578    \x{2028}
1579No match
1580
1581/\p{Nd}+(..)/utf
1582    \x{660}\x{661}\x{662}ABC
1583 0: \x{660}\x{661}\x{662}AB
1584 1: AB
1585
1586/\p{Nd}+?(..)/utf
1587    \x{660}\x{661}\x{662}ABC
1588 0: \x{660}\x{661}\x{662}
1589 1: \x{661}\x{662}
1590
1591/\p{Nd}{2,}(..)/utf
1592    \x{660}\x{661}\x{662}ABC
1593 0: \x{660}\x{661}\x{662}AB
1594 1: AB
1595
1596/\p{Nd}{2,}?(..)/utf
1597    \x{660}\x{661}\x{662}ABC
1598 0: \x{660}\x{661}\x{662}A
1599 1: \x{662}A
1600
1601/\p{Nd}*(..)/utf
1602    \x{660}\x{661}\x{662}ABC
1603 0: \x{660}\x{661}\x{662}AB
1604 1: AB
1605
1606/\p{Nd}*?(..)/utf
1607    \x{660}\x{661}\x{662}ABC
1608 0: \x{660}\x{661}
1609 1: \x{660}\x{661}
1610
1611/\p{Nd}{2}(..)/utf
1612    \x{660}\x{661}\x{662}ABC
1613 0: \x{660}\x{661}\x{662}A
1614 1: \x{662}A
1615
1616/\p{Nd}{2,3}(..)/utf
1617    \x{660}\x{661}\x{662}ABC
1618 0: \x{660}\x{661}\x{662}AB
1619 1: AB
1620
1621/\p{Nd}{2,3}?(..)/utf
1622    \x{660}\x{661}\x{662}ABC
1623 0: \x{660}\x{661}\x{662}A
1624 1: \x{662}A
1625
1626/\p{Nd}?(..)/utf
1627    \x{660}\x{661}\x{662}ABC
1628 0: \x{660}\x{661}\x{662}
1629 1: \x{661}\x{662}
1630
1631/\p{Nd}??(..)/utf
1632    \x{660}\x{661}\x{662}ABC
1633 0: \x{660}\x{661}
1634 1: \x{660}\x{661}
1635
1636/\p{Nd}*+(..)/utf
1637    \x{660}\x{661}\x{662}ABC
1638 0: \x{660}\x{661}\x{662}AB
1639 1: AB
1640
1641/\p{Nd}*+(...)/utf
1642    \x{660}\x{661}\x{662}ABC
1643 0: \x{660}\x{661}\x{662}ABC
1644 1: ABC
1645
1646/\p{Nd}*+(....)/utf
1647\= Expect no match
1648    \x{660}\x{661}\x{662}ABC
1649No match
1650
1651/(?<=A\p{Nd})XYZ/utf
1652    A2XYZ
1653 0: XYZ
1654    123A5XYZPQR
1655 0: XYZ
1656    ABA\x{660}XYZpqr
1657 0: XYZ
1658\= Expect no match
1659    AXYZ
1660No match
1661    XYZ
1662No match
1663
1664/(?<!\pL)XYZ/utf
1665    1XYZ
1666 0: XYZ
1667    AB=XYZ..
1668 0: XYZ
1669    XYZ
1670 0: XYZ
1671\= Expect no match
1672    WXYZ
1673No match
1674
1675/[\P{Nd}]+/utf
1676    abcd
1677 0: abcd
1678\= Expect no match
1679    1234
1680No match
1681
1682/\D+/utf
1683    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1684 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1685\= Expect no match
1686    11111111111111111111111111111111111111111111111111111111111111111111111
1687No match
1688
1689/\P{Nd}+/utf
1690    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1691 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1692\= Expect no match
1693    11111111111111111111111111111111111111111111111111111111111111111111111
1694No match
1695
1696/[\D]+/utf
1697    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1698 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1699\= Expect no match
1700    11111111111111111111111111111111111111111111111111111111111111111111111
1701No match
1702
1703/[\P{Nd}]+/utf
1704    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1705 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1706\= Expect no match
1707    11111111111111111111111111111111111111111111111111111111111111111111111
1708No match
1709
1710/[\D\P{Nd}]+/utf
1711    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1712 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1713\= Expect no match
1714    11111111111111111111111111111111111111111111111111111111111111111111111
1715No match
1716
1717/\pL/utf
1718    a
1719 0: a
1720    A
1721 0: A
1722
1723/\pL/i,utf
1724    a
1725 0: a
1726    A
1727 0: A
1728
1729/\p{Lu}/utf
1730    A
1731 0: A
1732    aZ
1733 0: Z
1734\= Expect no match
1735    abc
1736No match
1737
1738/\p{Ll}/utf
1739    a
1740 0: a
1741    Az
1742 0: z
1743\= Expect no match
1744    ABC
1745No match
1746
1747/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
1748    A\x{391}\x{10427}\x{ff3a}\x{1fb0}
1749 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
1750\= Expect no match
1751    a\x{391}\x{10427}\x{ff3a}\x{1fb0}
1752No match
1753    A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
1754No match
1755    A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
1756No match
1757    A\x{391}\x{10427}\x{ff5a}\x{1fb0}
1758No match
1759    A\x{391}\x{10427}\x{ff3a}\x{1fb8}
1760No match
1761
1762/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
1763    A\x{391}\x{10427}\x{ff3a}\x{1fb0}
1764 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
1765    a\x{391}\x{10427}\x{ff3a}\x{1fb0}
1766 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
1767    A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
1768 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
1769    A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
1770 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
1771    A\x{391}\x{10427}\x{ff5a}\x{1fb0}
1772 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
1773    A\x{391}\x{10427}\x{ff3a}\x{1fb8}
1774 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
1775
1776/\x{391}+/i,utf
1777    \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
1778 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
1779
1780/\x{391}{3,5}(.)/i,utf
1781    \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
1782 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
1783 1: X
1784
1785/\x{391}{3,5}?(.)/i,utf
1786    \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
1787 0: \x{391}\x{3b1}\x{3b1}\x{3b1}
1788 1: \x{3b1}
1789
1790/[\x{391}\x{ff3a}]/i,utf
1791    \x{391}
1792 0: \x{391}
1793    \x{ff3a}
1794 0: \x{ff3a}
1795    \x{3b1}
1796 0: \x{3b1}
1797    \x{ff5a}
1798 0: \x{ff5a}
1799
1800/^(\X*)C/utf
1801    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1802 0: A\x{300}\x{301}\x{302}BC
1803 1: A\x{300}\x{301}\x{302}B
1804    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1805 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1806 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1807
1808/^(\X*?)C/utf
1809    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1810 0: A\x{300}\x{301}\x{302}BC
1811 1: A\x{300}\x{301}\x{302}B
1812    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1813 0: A\x{300}\x{301}\x{302}BC
1814 1: A\x{300}\x{301}\x{302}B
1815
1816/^(\X*)(.)/utf
1817    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1818 0: A\x{300}\x{301}\x{302}BCA
1819 1: A\x{300}\x{301}\x{302}BC
1820 2: A
1821    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1822 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1823 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1824 2: C
1825
1826/^(\X*?)(.)/utf
1827    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
1828 0: A
1829 1:
1830 2: A
1831    A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
1832 0: A
1833 1:
1834 2: A
1835
1836/^\X(.)/utf
1837\= Expect no match
1838    A\x{300}\x{301}\x{302}
1839No match
1840
1841/^\X{2,3}(.)/utf
1842    A\x{300}\x{301}B\x{300}X
1843 0: A\x{300}\x{301}B\x{300}X
1844 1: X
1845    A\x{300}\x{301}B\x{300}C\x{300}\x{301}
1846 0: A\x{300}\x{301}B\x{300}C
1847 1: C
1848    A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
1849 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
1850 1: X
1851    A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
1852 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
1853 1: D
1854
1855/^\X{2,3}?(.)/utf
1856    A\x{300}\x{301}B\x{300}X
1857 0: A\x{300}\x{301}B\x{300}X
1858 1: X
1859    A\x{300}\x{301}B\x{300}C\x{300}\x{301}
1860 0: A\x{300}\x{301}B\x{300}C
1861 1: C
1862    A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
1863 0: A\x{300}\x{301}B\x{300}C
1864 1: C
1865    A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
1866 0: A\x{300}\x{301}B\x{300}C
1867 1: C
1868
1869/^\X/utf
1870    A
1871 0: A
1872    A\x{300}BC
1873 0: A\x{300}
1874    A\x{300}\x{301}\x{302}BC
1875 0: A\x{300}\x{301}\x{302}
1876    \x{300}
1877 0: \x{300}
1878
1879/^\p{Han}+/utf
1880    \x{2e81}\x{3007}\x{2f804}\x{31a0}
1881 0: \x{2e81}\x{3007}\x{2f804}
1882\= Expect no match
1883    \x{2e7f}
1884No match
1885
1886/^[\p{Arabic}]/utf
1887    \x{06e9}
1888 0: \x{6e9}
1889    \x{060b}
1890 0: \x{60b}
1891\= Expect no match
1892    X\x{06e9}
1893No match
1894
1895/^\P{Katakana}+/utf
1896    \x{3105}
1897 0: \x{3105}
1898\= Expect no match
1899    \x{30ff}
1900No match
1901
1902/^[\P{Yi}]/utf
1903    \x{2f800}
1904 0: \x{2f800}
1905\= Expect no match
1906    \x{a014}
1907No match
1908    \x{a4c6}
1909No match
1910
1911/^\p{Any}X/utf
1912    AXYZ
1913 0: AX
1914    \x{1234}XYZ
1915 0: \x{1234}X
1916\= Expect no match
1917    X
1918No match
1919
1920/^\P{Any}X/utf
1921\= Expect no match
1922    AX
1923No match
1924
1925/^\p{Any}?X/utf
1926    XYZ
1927 0: X
1928    AXYZ
1929 0: AX
1930    \x{1234}XYZ
1931 0: \x{1234}X
1932\= Expect no match
1933    ABXYZ
1934No match
1935
1936/^\P{Any}?X/utf
1937    XYZ
1938 0: X
1939\= Expect no match
1940    AXYZ
1941No match
1942    \x{1234}XYZ
1943No match
1944    ABXYZ
1945No match
1946
1947/^\p{Any}+X/utf
1948    AXYZ
1949 0: AX
1950    \x{1234}XYZ
1951 0: \x{1234}X
1952    A\x{1234}XYZ
1953 0: A\x{1234}X
1954\= Expect no match
1955    XYZ
1956No match
1957
1958/^\P{Any}+X/utf
1959\= Expect no match
1960    AXYZ
1961No match
1962    \x{1234}XYZ
1963No match
1964    A\x{1234}XYZ
1965No match
1966    XYZ
1967No match
1968
1969/^\p{Any}*X/utf
1970    XYZ
1971 0: X
1972    AXYZ
1973 0: AX
1974    \x{1234}XYZ
1975 0: \x{1234}X
1976    A\x{1234}XYZ
1977 0: A\x{1234}X
1978
1979/^\P{Any}*X/utf
1980    XYZ
1981 0: X
1982\= Expect no match
1983    AXYZ
1984No match
1985    \x{1234}XYZ
1986No match
1987    A\x{1234}XYZ
1988No match
1989
1990/^[\p{Any}]X/utf
1991    AXYZ
1992 0: AX
1993    \x{1234}XYZ
1994 0: \x{1234}X
1995\= Expect no match
1996    X
1997No match
1998
1999/^[\P{Any}]X/utf
2000\= Expect no match
2001    AX
2002No match
2003
2004/^[\p{Any}]?X/utf
2005    XYZ
2006 0: X
2007    AXYZ
2008 0: AX
2009    \x{1234}XYZ
2010 0: \x{1234}X
2011\= Expect no match
2012    ABXYZ
2013No match
2014
2015/^[\P{Any}]?X/utf
2016    XYZ
2017 0: X
2018\= Expect no match
2019    AXYZ
2020No match
2021    \x{1234}XYZ
2022No match
2023    ABXYZ
2024No match
2025
2026/^[\p{Any}]+X/utf
2027    AXYZ
2028 0: AX
2029    \x{1234}XYZ
2030 0: \x{1234}X
2031    A\x{1234}XYZ
2032 0: A\x{1234}X
2033\= Expect no match
2034    XYZ
2035No match
2036
2037/^[\P{Any}]+X/utf
2038\= Expect no match
2039    AXYZ
2040No match
2041    \x{1234}XYZ
2042No match
2043    A\x{1234}XYZ
2044No match
2045    XYZ
2046No match
2047
2048/^[\p{Any}]*X/utf
2049    XYZ
2050 0: X
2051    AXYZ
2052 0: AX
2053    \x{1234}XYZ
2054 0: \x{1234}X
2055    A\x{1234}XYZ
2056 0: A\x{1234}X
2057
2058/^[\P{Any}]*X/utf
2059    XYZ
2060 0: X
2061\= Expect no match
2062    AXYZ
2063No match
2064    \x{1234}XYZ
2065No match
2066    A\x{1234}XYZ
2067No match
2068
2069/^\p{Any}{3,5}?/utf
2070    abcdefgh
2071 0: abc
2072    \x{1234}\n\r\x{3456}xyz
2073 0: \x{1234}\x{0a}\x{0d}
2074
2075/^\p{Any}{3,5}/utf
2076    abcdefgh
2077 0: abcde
2078    \x{1234}\n\r\x{3456}xyz
2079 0: \x{1234}\x{0a}\x{0d}\x{3456}x
2080
2081/^\P{Any}{3,5}?/utf
2082\= Expect no match
2083    abcdefgh
2084No match
2085    \x{1234}\n\r\x{3456}xyz
2086No match
2087
2088/^\p{L&}X/utf
2089     AXY
2090 0: AX
2091     aXY
2092 0: aX
2093     \x{1c5}XY
2094 0: \x{1c5}X
2095\= Expect no match
2096    \x{1bb}XY
2097No match
2098    \x{2b0}XY
2099No match
2100    !XY
2101No match
2102
2103/^[\p{L&}]X/utf
2104    AXY
2105 0: AX
2106    aXY
2107 0: aX
2108     \x{1c5}XY
2109 0: \x{1c5}X
2110\= Expect no match
2111    \x{1bb}XY
2112No match
2113    \x{2b0}XY
2114No match
2115    !XY
2116No match
2117
2118/^\p{L&}+X/utf
2119    AXY
2120 0: AX
2121    aXY
2122 0: aX
2123    AbcdeXyz
2124 0: AbcdeX
2125    \x{1c5}AbXY
2126 0: \x{1c5}AbX
2127    abcDEXypqreXlmn
2128 0: abcDEXypqreX
2129\= Expect no match
2130    \x{1bb}XY
2131No match
2132    \x{2b0}XY
2133No match
2134    !XY
2135No match
2136
2137/^[\p{L&}]+X/utf
2138    AXY
2139 0: AX
2140    aXY
2141 0: aX
2142    AbcdeXyz
2143 0: AbcdeX
2144    \x{1c5}AbXY
2145 0: \x{1c5}AbX
2146    abcDEXypqreXlmn
2147 0: abcDEXypqreX
2148\= Expect no match
2149    \x{1bb}XY
2150No match
2151    \x{2b0}XY
2152No match
2153    !XY
2154No match
2155
2156/^\p{L&}+?X/utf
2157    AXY
2158 0: AX
2159    aXY
2160 0: aX
2161    AbcdeXyz
2162 0: AbcdeX
2163    \x{1c5}AbXY
2164 0: \x{1c5}AbX
2165    abcDEXypqreXlmn
2166 0: abcDEX
2167\= Expect no match
2168    \x{1bb}XY
2169No match
2170    \x{2b0}XY
2171No match
2172    !XY
2173No match
2174
2175/^[\p{L&}]+?X/utf
2176    AXY
2177 0: AX
2178    aXY
2179 0: aX
2180    AbcdeXyz
2181 0: AbcdeX
2182    \x{1c5}AbXY
2183 0: \x{1c5}AbX
2184    abcDEXypqreXlmn
2185 0: abcDEX
2186\= Expect no match
2187    \x{1bb}XY
2188No match
2189    \x{2b0}XY
2190No match
2191    !XY
2192No match
2193
2194/^\P{L&}X/utf
2195    !XY
2196 0: !X
2197    \x{1bb}XY
2198 0: \x{1bb}X
2199    \x{2b0}XY
2200 0: \x{2b0}X
2201\= Expect no match
2202    \x{1c5}XY
2203No match
2204    AXY
2205No match
2206
2207/^[\P{L&}]X/utf
2208    !XY
2209 0: !X
2210    \x{1bb}XY
2211 0: \x{1bb}X
2212    \x{2b0}XY
2213 0: \x{2b0}X
2214\= Expect no match
2215    \x{1c5}XY
2216No match
2217    AXY
2218No match
2219
2220/^(\p{Z}[^\p{C}\p{Z}]+)*$/
2221    \xa0!
2222 0: \xa0!
2223 1: \xa0!
2224
2225/^[\pL](abc)(?1)/
2226    AabcabcYZ
2227 0: Aabcabc
2228 1: abc
2229
2230/([\pL]=(abc))*X/
2231    L=abcX
2232 0: L=abcX
2233 1: L=abc
2234 2: abc
2235
2236/^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/utf
2237    \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
2238 0: \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
2239
2240# Check property support in non-UTF mode
2241
2242/\p{L}{4}/
2243    123abcdefg
2244 0: abcd
2245    123abc\xc4\xc5zz
2246 0: abc\xc4
2247
2248/\X{1,3}\d/
2249\= Expect no match
2250    \x8aBCD
2251No match
2252
2253/\X?\d/
2254\= Expect no match
2255    \x8aBCD
2256No match
2257
2258/\P{L}?\d/
2259\= Expect no match
2260    \x8aBCD
2261No match
2262
2263/[\PPP\x8a]{1,}\x80/
2264    A\x80
2265 0: A\x80
2266
2267/^[\p{Arabic}]/utf
2268    \x{604}
2269 0: \x{604}
2270    \x{60e}
2271 0: \x{60e}
2272    \x{656}
2273 0: \x{656}
2274    \x{657}
2275 0: \x{657}
2276    \x{658}
2277 0: \x{658}
2278    \x{659}
2279 0: \x{659}
2280    \x{65a}
2281 0: \x{65a}
2282    \x{65b}
2283 0: \x{65b}
2284    \x{65c}
2285 0: \x{65c}
2286    \x{65d}
2287 0: \x{65d}
2288    \x{65e}
2289 0: \x{65e}
2290    \x{65f}
2291 0: \x{65f}
2292    \x{66a}
2293 0: \x{66a}
2294    \x{6e9}
2295 0: \x{6e9}
2296    \x{6ef}
2297 0: \x{6ef}
2298    \x{6fa}
2299 0: \x{6fa}
2300
2301/^\p{Cyrillic}/utf
2302    \x{1d2b}
2303 0: \x{1d2b}
2304
2305/^\p{Common}/utf
2306    \x{2116}
2307 0: \x{2116}
2308    \x{1D183}
2309 0: \x{1d183}
2310
2311/^\p{Inherited}/utf
2312    \x{200c}
2313 0: \x{200c}
2314\= Expect no match
2315    \x{64a}
2316No match
2317    \x{656}
2318No match
2319
2320/^\p{Shavian}/utf
2321    \x{10450}
2322 0: \x{10450}
2323    \x{1047f}
2324 0: \x{1047f}
2325
2326/^\p{Deseret}/utf
2327    \x{10400}
2328 0: \x{10400}
2329    \x{1044f}
2330 0: \x{1044f}
2331
2332/^\p{Osmanya}/utf
2333    \x{10480}
2334 0: \x{10480}
2335    \x{1049d}
2336 0: \x{1049d}
2337    \x{104a0}
2338 0: \x{104a0}
2339    \x{104a9}
2340 0: \x{104a9}
2341\= Expect no match
2342    \x{1049e}
2343No match
2344    \x{1049f}
2345No match
2346    \x{104aa}
2347No match
2348
2349/\p{katakana}/utf
2350    \x{30a1}
2351 0: \x{30a1}
2352    \x{3001}
2353 0: \x{3001}
2354
2355/\p{scx:katakana}/utf
2356    \x{30a1}
2357 0: \x{30a1}
2358    \x{3001}
2359 0: \x{3001}
2360
2361/\p{script extensions:katakana}/utf
2362    \x{30a1}
2363 0: \x{30a1}
2364    \x{3001}
2365 0: \x{3001}
2366
2367/\p{sc:katakana}/utf
2368    \x{30a1}
2369 0: \x{30a1}
2370\= Expect no match
2371    \x{3001}
2372No match
2373
2374/\p{script:katakana}/utf
2375    \x{30a1}
2376 0: \x{30a1}
2377\= Expect no match
2378    \x{3001}
2379No match
2380
2381/\p{sc:katakana}{3,}/utf
2382    \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
2383 0: \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}
2384
2385/\p{sc:katakana}{3,}?/utf
2386    \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
2387 0: \x{30a1}\x{30fa}\x{32d0}
2388
2389/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/utf
2390    \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
2391 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
2392
2393/\x{a77d}\x{1d79}/i,utf
2394    \x{a77d}\x{1d79}
2395 0: \x{a77d}\x{1d79}
2396    \x{1d79}\x{a77d}
2397 0: \x{1d79}\x{a77d}
2398
2399/\x{a77d}\x{1d79}/utf
2400    \x{a77d}\x{1d79}
2401 0: \x{a77d}\x{1d79}
2402\= Expect no match
2403    \x{1d79}\x{a77d}
2404No match
2405
2406/(A)\1/i,utf
2407    AA
2408 0: AA
2409 1: A
2410    Aa
2411 0: Aa
2412 1: A
2413    aa
2414 0: aa
2415 1: a
2416    aA
2417 0: aA
2418 1: a
2419
2420/(\x{10a})\1/i,utf
2421    \x{10a}\x{10a}
2422 0: \x{10a}\x{10a}
2423 1: \x{10a}
2424    \x{10a}\x{10b}
2425 0: \x{10a}\x{10b}
2426 1: \x{10a}
2427    \x{10b}\x{10b}
2428 0: \x{10b}\x{10b}
2429 1: \x{10b}
2430    \x{10b}\x{10a}
2431 0: \x{10b}\x{10a}
2432 1: \x{10b}
2433
2434# The next two tests are for property support in non-UTF mode
2435
2436/(?:\p{Lu}|\x20)+/
2437    \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
2438 0: A P\xc2T\xc9 TODAY
2439
2440/[\p{Lu}\x20]+/
2441    \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
2442 0: A P\xc2T\xc9 TODAY
2443
2444/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/utf
2445    \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0}
2446 0: \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{800}\x{1aad}\x{aac0}
2447
2448/^\w+/utf,ucp
2449    Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
2450 0: Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
2451
2452/^[[:xdigit:]]*/utf,ucp
2453    1a\x{660}\x{bef}\x{16ee}
2454 0: 1a
2455
2456/^\d+/utf,ucp
2457    1\x{660}\x{bef}\x{16ee}
2458 0: 1\x{660}\x{bef}
2459
2460/^[[:digit:]]+/utf,ucp
2461    1\x{660}\x{bef}\x{16ee}
2462 0: 1\x{660}\x{bef}
2463
2464/^>\s+/utf,ucp
2465    >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
2466 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
2467
2468/^>\pZ+/utf,ucp
2469    >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
2470 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}
2471
2472/^>[[:space:]]*/utf,ucp
2473    >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
2474 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
2475
2476/^>[[:blank:]]*/utf,ucp
2477    >\x{20}\x{a0}\x{1680}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
2478 0: > \x{a0}\x{1680}\x{2000}\x{202f}\x{09}
2479
2480/^[[:alpha:]]*/utf,ucp
2481    Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
2482 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
2483
2484/^[[:alnum:]]*/utf,ucp
2485    Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
2486 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
2487
2488/^[[:cntrl:]]*/utf,ucp
2489    \x{0}\x{09}\x{1f}\x{7f}\x{9f}
2490 0: \x{00}\x{09}\x{1f}\x{7f}\x{9f}
2491
2492/^[[:graph:]]*/utf,ucp
2493    A\x{a1}\x{a0}
2494 0: A\x{a1}
2495
2496/^[[:print:]]*/utf,ucp
2497    A z\x{a0}\x{a1}
2498 0: A z\x{a0}\x{a1}
2499
2500/^[[:punct:]]*/utf,ucp
2501    .+\x{a1}\x{a0}
2502 0: .+\x{a1}
2503
2504/\p{Zs}*?\R/
2505\= Expect no match
2506    a\xFCb
2507No match
2508
2509/\p{Zs}*\R/
2510\= Expect no match
2511    a\xFCb
2512No match
2513
2514/ⱥ/i,utf
25152516 0: \x{2c65}
2517    Ⱥx
2518 0: \x{23a}
2519    Ⱥ
2520 0: \x{23a}
2521
2522/[ⱥ]/i,utf
25232524 0: \x{2c65}
2525    Ⱥx
2526 0: \x{23a}
2527    Ⱥ
2528 0: \x{23a}
2529
2530/Ⱥ/i,utf
2531    Ⱥ
2532 0: \x{23a}
25332534 0: \x{2c65}
2535
2536# These are tests for extended grapheme clusters
2537
2538/^\X/utf,aftertext
2539    G\x{34e}\x{34e}X
2540 0: G\x{34e}\x{34e}
2541 0+ X
2542    \x{34e}\x{34e}X
2543 0: \x{34e}\x{34e}
2544 0+ X
2545    \x04X
2546 0: \x{04}
2547 0+ X
2548    \x{1100}X
2549 0: \x{1100}
2550 0+ X
2551    \x{1100}\x{34e}X
2552 0: \x{1100}\x{34e}
2553 0+ X
2554    \x{1b04}\x{1b04}X
2555 0: \x{1b04}\x{1b04}
2556 0+ X
2557    *These match up to the roman letters
2558 0: *
2559 0+ These match up to the roman letters
2560    \x{1111}\x{1111}L,L
2561 0: \x{1111}\x{1111}
2562 0+ L,L
2563    \x{1111}\x{1111}\x{1169}L,L,V
2564 0: \x{1111}\x{1111}\x{1169}
2565 0+ L,L,V
2566    \x{1111}\x{ae4c}L, LV
2567 0: \x{1111}\x{ae4c}
2568 0+ L, LV
2569    \x{1111}\x{ad89}L, LVT
2570 0: \x{1111}\x{ad89}
2571 0+ L, LVT
2572    \x{1111}\x{ae4c}\x{1169}L, LV, V
2573 0: \x{1111}\x{ae4c}\x{1169}
2574 0+ L, LV, V
2575    \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V
2576 0: \x{1111}\x{ae4c}\x{1169}\x{1169}
2577 0+ L, LV, V, V
2578    \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T
2579 0: \x{1111}\x{ae4c}\x{1169}\x{11fe}
2580 0+ L, LV, V, T
2581    \x{1111}\x{ad89}\x{11fe}L, LVT, T
2582 0: \x{1111}\x{ad89}\x{11fe}
2583 0+ L, LVT, T
2584    \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T
2585 0: \x{1111}\x{ad89}\x{11fe}\x{11fe}
2586 0+ L, LVT, T, T
2587    \x{ad89}\x{11fe}\x{11fe}LVT, T, T
2588 0: \x{ad89}\x{11fe}\x{11fe}
2589 0+ LVT, T, T
2590    *These match just the first codepoint (invalid sequence)
2591 0: *
2592 0+ These match just the first codepoint (invalid sequence)
2593    \x{1111}\x{11fe}L, T
2594 0: \x{1111}
2595 0+ \x{11fe}L, T
2596    \x{ae4c}\x{1111}LV, L
2597 0: \x{ae4c}
2598 0+ \x{1111}LV, L
2599    \x{ae4c}\x{ae4c}LV, LV
2600 0: \x{ae4c}
2601 0+ \x{ae4c}LV, LV
2602    \x{ae4c}\x{ad89}LV, LVT
2603 0: \x{ae4c}
2604 0+ \x{ad89}LV, LVT
2605    \x{1169}\x{1111}V, L
2606 0: \x{1169}
2607 0+ \x{1111}V, L
2608    \x{1169}\x{ae4c}V, LV
2609 0: \x{1169}
2610 0+ \x{ae4c}V, LV
2611    \x{1169}\x{ad89}V, LVT
2612 0: \x{1169}
2613 0+ \x{ad89}V, LVT
2614    \x{ad89}\x{1111}LVT, L
2615 0: \x{ad89}
2616 0+ \x{1111}LVT, L
2617    \x{ad89}\x{1169}LVT, V
2618 0: \x{ad89}
2619 0+ \x{1169}LVT, V
2620    \x{ad89}\x{ae4c}LVT, LV
2621 0: \x{ad89}
2622 0+ \x{ae4c}LVT, LV
2623    \x{ad89}\x{ad89}LVT, LVT
2624 0: \x{ad89}
2625 0+ \x{ad89}LVT, LVT
2626    \x{11fe}\x{1111}T, L
2627 0: \x{11fe}
2628 0+ \x{1111}T, L
2629    \x{11fe}\x{1169}T, V
2630 0: \x{11fe}
2631 0+ \x{1169}T, V
2632    \x{11fe}\x{ae4c}T, LV
2633 0: \x{11fe}
2634 0+ \x{ae4c}T, LV
2635    \x{11fe}\x{ad89}T, LVT
2636 0: \x{11fe}
2637 0+ \x{ad89}T, LVT
2638    *Test extend and spacing mark
2639 0: *
2640 0+ Test extend and spacing mark
2641    \x{1111}\x{ae4c}\x{0711}L, LV, extend
2642 0: \x{1111}\x{ae4c}\x{711}
2643 0+ L, LV, extend
2644    \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark
2645 0: \x{1111}\x{ae4c}\x{1b04}
2646 0+ L, LV, spacing mark
2647    \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark
2648 0: \x{1111}\x{ae4c}\x{1b04}\x{711}\x{1b04}
2649 0+ L, LV, spacing mark, extend, spacing mark
2650    *Test CR, LF, and control
2651 0: *
2652 0+ Test CR, LF, and control
2653    \x0d\x{0711}CR, extend
2654 0: \x{0d}
2655 0+ \x{711}CR, extend
2656    \x0d\x{1b04}CR, spacingmark
2657 0: \x{0d}
2658 0+ \x{1b04}CR, spacingmark
2659    \x0a\x{0711}LF, extend
2660 0: \x{0a}
2661 0+ \x{711}LF, extend
2662    \x0a\x{1b04}LF, spacingmark
2663 0: \x{0a}
2664 0+ \x{1b04}LF, spacingmark
2665    \x0b\x{0711}Control, extend
2666 0: \x{0b}
2667 0+ \x{711}Control, extend
2668    \x09\x{1b04}Control, spacingmark
2669 0: \x{09}
2670 0+ \x{1b04}Control, spacingmark
2671    *There are no Prepend characters, so we can't test Prepend, CR
2672 0: *
2673 0+ There are no Prepend characters, so we can't test Prepend, CR
2674
2675/^(?>\X{2})X/utf,aftertext
2676    \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2677 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2678 0+
2679
2680/^\X{2,4}X/utf,aftertext
2681    \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2682 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2683 0+
2684    \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2685 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2686 0+
2687    \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2688 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2689 0+
2690
2691/^\X{2,4}?X/utf,aftertext
2692    \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2693 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2694 0+
2695    \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2696 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2697 0+
2698    \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2699 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
2700 0+
2701
2702/\X*Z/utf,no_start_optimize
2703\= Expect no match
2704    A\x{300}
2705No match
2706
2707/\X*(.)/utf,no_start_optimize
2708    A\x{1111}\x{ae4c}\x{1169}
2709 0: A\x{1111}
2710 1: \x{1111}
2711
2712# --------------------------------------------
2713
2714/\x{1e9e}+/i,utf
2715    \x{1e9e}\x{00df}
2716 0: \x{1e9e}\x{df}
2717
2718/[z\x{1e9e}]+/i,utf
2719    \x{1e9e}\x{00df}
2720 0: \x{1e9e}\x{df}
2721
2722/\x{00df}+/i,utf
2723    \x{1e9e}\x{00df}
2724 0: \x{1e9e}\x{df}
2725
2726/[z\x{00df}]+/i,utf
2727    \x{1e9e}\x{00df}
2728 0: \x{1e9e}\x{df}
2729
2730/\x{1f88}+/i,utf
2731    \x{1f88}\x{1f80}
2732 0: \x{1f88}\x{1f80}
2733
2734/[z\x{1f88}]+/i,utf
2735    \x{1f88}\x{1f80}
2736 0: \x{1f88}\x{1f80}
2737
2738# Check a reference with more than one other case
2739
2740/^(\x{00b5})\1{2}$/i,utf
2741    \x{00b5}\x{039c}\x{03bc}
2742 0: \x{b5}\x{39c}\x{3bc}
2743 1: \x{b5}
2744
2745# Characters with more than one other case; test in classes
2746
2747/[z\x{00b5}]+/i,utf
2748    \x{00b5}\x{039c}\x{03bc}
2749 0: \x{b5}\x{39c}\x{3bc}
2750
2751/[z\x{039c}]+/i,utf
2752    \x{00b5}\x{039c}\x{03bc}
2753 0: \x{b5}\x{39c}\x{3bc}
2754
2755/[z\x{03bc}]+/i,utf
2756    \x{00b5}\x{039c}\x{03bc}
2757 0: \x{b5}\x{39c}\x{3bc}
2758
2759/[z\x{00c5}]+/i,utf
2760    \x{00c5}\x{00e5}\x{212b}
2761 0: \x{c5}\x{e5}\x{212b}
2762
2763/[z\x{00e5}]+/i,utf
2764    \x{00c5}\x{00e5}\x{212b}
2765 0: \x{c5}\x{e5}\x{212b}
2766
2767/[z\x{212b}]+/i,utf
2768    \x{00c5}\x{00e5}\x{212b}
2769 0: \x{c5}\x{e5}\x{212b}
2770
2771/[z\x{01c4}]+/i,utf
2772    \x{01c4}\x{01c5}\x{01c6}
2773 0: \x{1c4}\x{1c5}\x{1c6}
2774
2775/[z\x{01c5}]+/i,utf
2776    \x{01c4}\x{01c5}\x{01c6}
2777 0: \x{1c4}\x{1c5}\x{1c6}
2778
2779/[z\x{01c6}]+/i,utf
2780    \x{01c4}\x{01c5}\x{01c6}
2781 0: \x{1c4}\x{1c5}\x{1c6}
2782
2783/[z\x{01c7}]+/i,utf
2784    \x{01c7}\x{01c8}\x{01c9}
2785 0: \x{1c7}\x{1c8}\x{1c9}
2786
2787/[z\x{01c8}]+/i,utf
2788    \x{01c7}\x{01c8}\x{01c9}
2789 0: \x{1c7}\x{1c8}\x{1c9}
2790
2791/[z\x{01c9}]+/i,utf
2792    \x{01c7}\x{01c8}\x{01c9}
2793 0: \x{1c7}\x{1c8}\x{1c9}
2794
2795/[z\x{01ca}]+/i,utf
2796    \x{01ca}\x{01cb}\x{01cc}
2797 0: \x{1ca}\x{1cb}\x{1cc}
2798
2799/[z\x{01cb}]+/i,utf
2800    \x{01ca}\x{01cb}\x{01cc}
2801 0: \x{1ca}\x{1cb}\x{1cc}
2802
2803/[z\x{01cc}]+/i,utf
2804    \x{01ca}\x{01cb}\x{01cc}
2805 0: \x{1ca}\x{1cb}\x{1cc}
2806
2807/[z\x{01f1}]+/i,utf
2808    \x{01f1}\x{01f2}\x{01f3}
2809 0: \x{1f1}\x{1f2}\x{1f3}
2810
2811/[z\x{01f2}]+/i,utf
2812    \x{01f1}\x{01f2}\x{01f3}
2813 0: \x{1f1}\x{1f2}\x{1f3}
2814
2815/[z\x{01f3}]+/i,utf
2816    \x{01f1}\x{01f2}\x{01f3}
2817 0: \x{1f1}\x{1f2}\x{1f3}
2818
2819/[z\x{0345}]+/i,utf
2820    \x{0345}\x{0399}\x{03b9}\x{1fbe}
2821 0: \x{345}\x{399}\x{3b9}\x{1fbe}
2822
2823/[z\x{0399}]+/i,utf
2824    \x{0345}\x{0399}\x{03b9}\x{1fbe}
2825 0: \x{345}\x{399}\x{3b9}\x{1fbe}
2826
2827/[z\x{03b9}]+/i,utf
2828    \x{0345}\x{0399}\x{03b9}\x{1fbe}
2829 0: \x{345}\x{399}\x{3b9}\x{1fbe}
2830
2831/[z\x{1fbe}]+/i,utf
2832    \x{0345}\x{0399}\x{03b9}\x{1fbe}
2833 0: \x{345}\x{399}\x{3b9}\x{1fbe}
2834
2835/[z\x{0392}]+/i,utf
2836    \x{0392}\x{03b2}\x{03d0}
2837 0: \x{392}\x{3b2}\x{3d0}
2838
2839/[z\x{03b2}]+/i,utf
2840    \x{0392}\x{03b2}\x{03d0}
2841 0: \x{392}\x{3b2}\x{3d0}
2842
2843/[z\x{03d0}]+/i,utf
2844    \x{0392}\x{03b2}\x{03d0}
2845 0: \x{392}\x{3b2}\x{3d0}
2846
2847/[z\x{0395}]+/i,utf
2848    \x{0395}\x{03b5}\x{03f5}
2849 0: \x{395}\x{3b5}\x{3f5}
2850
2851/[z\x{03b5}]+/i,utf
2852    \x{0395}\x{03b5}\x{03f5}
2853 0: \x{395}\x{3b5}\x{3f5}
2854
2855/[z\x{03f5}]+/i,utf
2856    \x{0395}\x{03b5}\x{03f5}
2857 0: \x{395}\x{3b5}\x{3f5}
2858
2859/[z\x{0398}]+/i,utf
2860    \x{0398}\x{03b8}\x{03d1}\x{03f4}
2861 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
2862
2863/[z\x{03b8}]+/i,utf
2864    \x{0398}\x{03b8}\x{03d1}\x{03f4}
2865 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
2866
2867/[z\x{03d1}]+/i,utf
2868    \x{0398}\x{03b8}\x{03d1}\x{03f4}
2869 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
2870
2871/[z\x{03f4}]+/i,utf
2872    \x{0398}\x{03b8}\x{03d1}\x{03f4}
2873 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
2874
2875/[z\x{039a}]+/i,utf
2876    \x{039a}\x{03ba}\x{03f0}
2877 0: \x{39a}\x{3ba}\x{3f0}
2878
2879/[z\x{03ba}]+/i,utf
2880    \x{039a}\x{03ba}\x{03f0}
2881 0: \x{39a}\x{3ba}\x{3f0}
2882
2883/[z\x{03f0}]+/i,utf
2884    \x{039a}\x{03ba}\x{03f0}
2885 0: \x{39a}\x{3ba}\x{3f0}
2886
2887/[z\x{03a0}]+/i,utf
2888    \x{03a0}\x{03c0}\x{03d6}
2889 0: \x{3a0}\x{3c0}\x{3d6}
2890
2891/[z\x{03c0}]+/i,utf
2892    \x{03a0}\x{03c0}\x{03d6}
2893 0: \x{3a0}\x{3c0}\x{3d6}
2894
2895/[z\x{03d6}]+/i,utf
2896    \x{03a0}\x{03c0}\x{03d6}
2897 0: \x{3a0}\x{3c0}\x{3d6}
2898
2899/[z\x{03a1}]+/i,utf
2900    \x{03a1}\x{03c1}\x{03f1}
2901 0: \x{3a1}\x{3c1}\x{3f1}
2902
2903/[z\x{03c1}]+/i,utf
2904    \x{03a1}\x{03c1}\x{03f1}
2905 0: \x{3a1}\x{3c1}\x{3f1}
2906
2907/[z\x{03f1}]+/i,utf
2908    \x{03a1}\x{03c1}\x{03f1}
2909 0: \x{3a1}\x{3c1}\x{3f1}
2910
2911/[z\x{03a3}]+/i,utf
2912    \x{03A3}\x{03C2}\x{03C3}
2913 0: \x{3a3}\x{3c2}\x{3c3}
2914
2915/[z\x{03c2}]+/i,utf
2916    \x{03A3}\x{03C2}\x{03C3}
2917 0: \x{3a3}\x{3c2}\x{3c3}
2918
2919/[z\x{03c3}]+/i,utf
2920    \x{03A3}\x{03C2}\x{03C3}
2921 0: \x{3a3}\x{3c2}\x{3c3}
2922
2923/[z\x{03a6}]+/i,utf
2924    \x{03a6}\x{03c6}\x{03d5}
2925 0: \x{3a6}\x{3c6}\x{3d5}
2926
2927/[z\x{03c6}]+/i,utf
2928    \x{03a6}\x{03c6}\x{03d5}
2929 0: \x{3a6}\x{3c6}\x{3d5}
2930
2931/[z\x{03d5}]+/i,utf
2932    \x{03a6}\x{03c6}\x{03d5}
2933 0: \x{3a6}\x{3c6}\x{3d5}
2934
2935/[z\x{03c9}]+/i,utf
2936    \x{03c9}\x{03a9}\x{2126}
2937 0: \x{3c9}\x{3a9}\x{2126}
2938
2939/[z\x{03a9}]+/i,utf
2940    \x{03c9}\x{03a9}\x{2126}
2941 0: \x{3c9}\x{3a9}\x{2126}
2942
2943/[z\x{2126}]+/i,utf
2944    \x{03c9}\x{03a9}\x{2126}
2945 0: \x{3c9}\x{3a9}\x{2126}
2946
2947/[z\x{1e60}]+/i,utf
2948    \x{1e60}\x{1e61}\x{1e9b}
2949 0: \x{1e60}\x{1e61}\x{1e9b}
2950
2951/[z\x{1e61}]+/i,utf
2952    \x{1e60}\x{1e61}\x{1e9b}
2953 0: \x{1e60}\x{1e61}\x{1e9b}
2954
2955/[z\x{1e9b}]+/i,utf
2956    \x{1e60}\x{1e61}\x{1e9b}
2957 0: \x{1e60}\x{1e61}\x{1e9b}
2958
2959# Perl 5.12.4 gets these wrong, but 5.15.3 is OK
2960
2961/[z\x{004b}]+/i,utf
2962    \x{004b}\x{006b}\x{212a}
2963 0: Kk\x{212a}
2964
2965/[z\x{006b}]+/i,utf
2966    \x{004b}\x{006b}\x{212a}
2967 0: Kk\x{212a}
2968
2969/[z\x{212a}]+/i,utf
2970    \x{004b}\x{006b}\x{212a}
2971 0: Kk\x{212a}
2972
2973/[z\x{0053}]+/i,utf
2974    \x{0053}\x{0073}\x{017f}
2975 0: Ss\x{17f}
2976
2977/[z\x{0073}]+/i,utf
2978    \x{0053}\x{0073}\x{017f}
2979 0: Ss\x{17f}
2980
2981/[z\x{017f}]+/i,utf
2982    \x{0053}\x{0073}\x{017f}
2983 0: Ss\x{17f}
2984
2985# --------------------------------------
2986
2987/(ΣΆΜΟΣ) \1/i,utf
2988    ΣΆΜΟΣ ΣΆΜΟΣ
2989 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
2990 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
2991    ΣΆΜΟΣ σάμος
2992 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
2993 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
2994    σάμος σάμος
2995 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
2996 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
2997    σάμος σάμοσ
2998 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
2999 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3000    σάμος ΣΆΜΟΣ
3001 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3002 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3003
3004/(σάμος) \1/i,utf
3005    ΣΆΜΟΣ ΣΆΜΟΣ
3006 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3007 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3008    ΣΆΜΟΣ σάμος
3009 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3010 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3011    σάμος σάμος
3012 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3013 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3014    σάμος σάμοσ
3015 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
3016 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3017    σάμος ΣΆΜΟΣ
3018 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3019 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
3020
3021/(ΣΆΜΟΣ) \1*/i,utf
3022    ΣΆΜΟΣ\x20
3023 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3024 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3025    ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος
3026 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}
3027 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
3028
3029# Perl matches these
3030
3031/\x{00b5}+/i,utf
3032    \x{00b5}\x{039c}\x{03bc}
3033 0: \x{b5}\x{39c}\x{3bc}
3034
3035/\x{039c}+/i,utf
3036    \x{00b5}\x{039c}\x{03bc}
3037 0: \x{b5}\x{39c}\x{3bc}
3038
3039/\x{03bc}+/i,utf
3040    \x{00b5}\x{039c}\x{03bc}
3041 0: \x{b5}\x{39c}\x{3bc}
3042
3043
3044/\x{00c5}+/i,utf
3045    \x{00c5}\x{00e5}\x{212b}
3046 0: \x{c5}\x{e5}\x{212b}
3047
3048/\x{00e5}+/i,utf
3049    \x{00c5}\x{00e5}\x{212b}
3050 0: \x{c5}\x{e5}\x{212b}
3051
3052/\x{212b}+/i,utf
3053    \x{00c5}\x{00e5}\x{212b}
3054 0: \x{c5}\x{e5}\x{212b}
3055
3056
3057/\x{01c4}+/i,utf
3058    \x{01c4}\x{01c5}\x{01c6}
3059 0: \x{1c4}\x{1c5}\x{1c6}
3060
3061/\x{01c5}+/i,utf
3062    \x{01c4}\x{01c5}\x{01c6}
3063 0: \x{1c4}\x{1c5}\x{1c6}
3064
3065/\x{01c6}+/i,utf
3066    \x{01c4}\x{01c5}\x{01c6}
3067 0: \x{1c4}\x{1c5}\x{1c6}
3068
3069
3070/\x{01c7}+/i,utf
3071    \x{01c7}\x{01c8}\x{01c9}
3072 0: \x{1c7}\x{1c8}\x{1c9}
3073
3074/\x{01c8}+/i,utf
3075    \x{01c7}\x{01c8}\x{01c9}
3076 0: \x{1c7}\x{1c8}\x{1c9}
3077
3078/\x{01c9}+/i,utf
3079    \x{01c7}\x{01c8}\x{01c9}
3080 0: \x{1c7}\x{1c8}\x{1c9}
3081
3082
3083/\x{01ca}+/i,utf
3084    \x{01ca}\x{01cb}\x{01cc}
3085 0: \x{1ca}\x{1cb}\x{1cc}
3086
3087/\x{01cb}+/i,utf
3088    \x{01ca}\x{01cb}\x{01cc}
3089 0: \x{1ca}\x{1cb}\x{1cc}
3090
3091/\x{01cc}+/i,utf
3092    \x{01ca}\x{01cb}\x{01cc}
3093 0: \x{1ca}\x{1cb}\x{1cc}
3094
3095
3096/\x{01f1}+/i,utf
3097    \x{01f1}\x{01f2}\x{01f3}
3098 0: \x{1f1}\x{1f2}\x{1f3}
3099
3100/\x{01f2}+/i,utf
3101    \x{01f1}\x{01f2}\x{01f3}
3102 0: \x{1f1}\x{1f2}\x{1f3}
3103
3104/\x{01f3}+/i,utf
3105    \x{01f1}\x{01f2}\x{01f3}
3106 0: \x{1f1}\x{1f2}\x{1f3}
3107
3108
3109/\x{0345}+/i,utf
3110    \x{0345}\x{0399}\x{03b9}\x{1fbe}
3111 0: \x{345}\x{399}\x{3b9}\x{1fbe}
3112
3113/\x{0399}+/i,utf
3114    \x{0345}\x{0399}\x{03b9}\x{1fbe}
3115 0: \x{345}\x{399}\x{3b9}\x{1fbe}
3116
3117/\x{03b9}+/i,utf
3118    \x{0345}\x{0399}\x{03b9}\x{1fbe}
3119 0: \x{345}\x{399}\x{3b9}\x{1fbe}
3120
3121/\x{1fbe}+/i,utf
3122    \x{0345}\x{0399}\x{03b9}\x{1fbe}
3123 0: \x{345}\x{399}\x{3b9}\x{1fbe}
3124
3125
3126/\x{0392}+/i,utf
3127    \x{0392}\x{03b2}\x{03d0}
3128 0: \x{392}\x{3b2}\x{3d0}
3129
3130/\x{03b2}+/i,utf
3131    \x{0392}\x{03b2}\x{03d0}
3132 0: \x{392}\x{3b2}\x{3d0}
3133
3134/\x{03d0}+/i,utf
3135    \x{0392}\x{03b2}\x{03d0}
3136 0: \x{392}\x{3b2}\x{3d0}
3137
3138
3139/\x{0395}+/i,utf
3140    \x{0395}\x{03b5}\x{03f5}
3141 0: \x{395}\x{3b5}\x{3f5}
3142
3143/\x{03b5}+/i,utf
3144    \x{0395}\x{03b5}\x{03f5}
3145 0: \x{395}\x{3b5}\x{3f5}
3146
3147/\x{03f5}+/i,utf
3148    \x{0395}\x{03b5}\x{03f5}
3149 0: \x{395}\x{3b5}\x{3f5}
3150
3151
3152/\x{0398}+/i,utf
3153    \x{0398}\x{03b8}\x{03d1}\x{03f4}
3154 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
3155
3156/\x{03b8}+/i,utf
3157    \x{0398}\x{03b8}\x{03d1}\x{03f4}
3158 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
3159
3160/\x{03d1}+/i,utf
3161    \x{0398}\x{03b8}\x{03d1}\x{03f4}
3162 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
3163
3164/\x{03f4}+/i,utf
3165    \x{0398}\x{03b8}\x{03d1}\x{03f4}
3166 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
3167
3168
3169/\x{039a}+/i,utf
3170    \x{039a}\x{03ba}\x{03f0}
3171 0: \x{39a}\x{3ba}\x{3f0}
3172
3173/\x{03ba}+/i,utf
3174    \x{039a}\x{03ba}\x{03f0}
3175 0: \x{39a}\x{3ba}\x{3f0}
3176
3177/\x{03f0}+/i,utf
3178    \x{039a}\x{03ba}\x{03f0}
3179 0: \x{39a}\x{3ba}\x{3f0}
3180
3181
3182/\x{03a0}+/i,utf
3183    \x{03a0}\x{03c0}\x{03d6}
3184 0: \x{3a0}\x{3c0}\x{3d6}
3185
3186/\x{03c0}+/i,utf
3187    \x{03a0}\x{03c0}\x{03d6}
3188 0: \x{3a0}\x{3c0}\x{3d6}
3189
3190/\x{03d6}+/i,utf
3191    \x{03a0}\x{03c0}\x{03d6}
3192 0: \x{3a0}\x{3c0}\x{3d6}
3193
3194
3195/\x{03a1}+/i,utf
3196    \x{03a1}\x{03c1}\x{03f1}
3197 0: \x{3a1}\x{3c1}\x{3f1}
3198
3199/\x{03c1}+/i,utf
3200    \x{03a1}\x{03c1}\x{03f1}
3201 0: \x{3a1}\x{3c1}\x{3f1}
3202
3203/\x{03f1}+/i,utf
3204    \x{03a1}\x{03c1}\x{03f1}
3205 0: \x{3a1}\x{3c1}\x{3f1}
3206
3207
3208/\x{03a3}+/i,utf
3209    \x{03A3}\x{03C2}\x{03C3}
3210 0: \x{3a3}\x{3c2}\x{3c3}
3211
3212/\x{03c2}+/i,utf
3213    \x{03A3}\x{03C2}\x{03C3}
3214 0: \x{3a3}\x{3c2}\x{3c3}
3215
3216/\x{03c3}+/i,utf
3217    \x{03A3}\x{03C2}\x{03C3}
3218 0: \x{3a3}\x{3c2}\x{3c3}
3219
3220
3221/\x{03a6}+/i,utf
3222    \x{03a6}\x{03c6}\x{03d5}
3223 0: \x{3a6}\x{3c6}\x{3d5}
3224
3225/\x{03c6}+/i,utf
3226    \x{03a6}\x{03c6}\x{03d5}
3227 0: \x{3a6}\x{3c6}\x{3d5}
3228
3229/\x{03d5}+/i,utf
3230    \x{03a6}\x{03c6}\x{03d5}
3231 0: \x{3a6}\x{3c6}\x{3d5}
3232
3233
3234/\x{03c9}+/i,utf
3235    \x{03c9}\x{03a9}\x{2126}
3236 0: \x{3c9}\x{3a9}\x{2126}
3237
3238/\x{03a9}+/i,utf
3239    \x{03c9}\x{03a9}\x{2126}
3240 0: \x{3c9}\x{3a9}\x{2126}
3241
3242/\x{2126}+/i,utf
3243    \x{03c9}\x{03a9}\x{2126}
3244 0: \x{3c9}\x{3a9}\x{2126}
3245
3246
3247/\x{1e60}+/i,utf
3248    \x{1e60}\x{1e61}\x{1e9b}
3249 0: \x{1e60}\x{1e61}\x{1e9b}
3250
3251/\x{1e61}+/i,utf
3252    \x{1e60}\x{1e61}\x{1e9b}
3253 0: \x{1e60}\x{1e61}\x{1e9b}
3254
3255/\x{1e9b}+/i,utf
3256    \x{1e60}\x{1e61}\x{1e9b}
3257 0: \x{1e60}\x{1e61}\x{1e9b}
3258
3259
3260/\x{1e9e}+/i,utf
3261    \x{1e9e}\x{00df}
3262 0: \x{1e9e}\x{df}
3263
3264/\x{00df}+/i,utf
3265    \x{1e9e}\x{00df}
3266 0: \x{1e9e}\x{df}
3267
3268
3269/\x{1f88}+/i,utf
3270    \x{1f88}\x{1f80}
3271 0: \x{1f88}\x{1f80}
3272
3273/\x{1f80}+/i,utf
3274    \x{1f88}\x{1f80}
3275 0: \x{1f88}\x{1f80}
3276
3277# Perl 5.12.4 gets these wrong, but 5.15.3 is OK
3278
3279/\x{004b}+/i,utf
3280    \x{004b}\x{006b}\x{212a}
3281 0: Kk\x{212a}
3282
3283/\x{006b}+/i,utf
3284    \x{004b}\x{006b}\x{212a}
3285 0: Kk\x{212a}
3286
3287/\x{212a}+/i,utf
3288    \x{004b}\x{006b}\x{212a}
3289 0: Kk\x{212a}
3290
3291
3292/\x{0053}+/i,utf
3293    \x{0053}\x{0073}\x{017f}
3294 0: Ss\x{17f}
3295
3296/\x{0073}+/i,utf
3297    \x{0053}\x{0073}\x{017f}
3298 0: Ss\x{17f}
3299
3300/\x{017f}+/i,utf
3301    \x{0053}\x{0073}\x{017f}
3302 0: Ss\x{17f}
3303
3304/^\p{Any}*\d{4}/utf
3305    1234
3306 0: 1234
3307\= Expect no match
3308    123
3309No match
3310
3311/^\X*\w{4}/utf
3312    1234
3313 0: 1234
3314\= Expect no match
3315    123
3316No match
3317
3318/^A\s+Z/utf,ucp
3319    A\x{2005}Z
3320 0: A\x{2005}Z
3321    A\x{85}\x{2005}Z
3322 0: A\x{85}\x{2005}Z
3323
3324/^A[\s]+Z/utf,ucp
3325    A\x{2005}Z
3326 0: A\x{2005}Z
3327    A\x{85}\x{2005}Z
3328 0: A\x{85}\x{2005}Z
3329
3330/^[[:graph:]]+$/utf,ucp
3331    Letter:ABC
3332 0: Letter:ABC
3333    Mark:\x{300}\x{1d172}\x{1d17b}
3334 0: Mark:\x{300}\x{1d172}\x{1d17b}
3335    Number:9\x{660}
3336 0: Number:9\x{660}
3337    Punctuation:\x{66a},;
3338 0: Punctuation:\x{66a},;
3339    Symbol:\x{6de}<>\x{fffc}
3340 0: Symbol:\x{6de}<>\x{fffc}
3341    Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3342 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3343    \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3344 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3345    \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3346 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3347    \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3348 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3349    \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3350 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3351    \x{feff}
3352 0: \x{feff}
3353    \x{fff9}\x{fffa}\x{fffb}
3354 0: \x{fff9}\x{fffa}\x{fffb}
3355    \x{110bd}
3356 0: \x{110bd}
3357    \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3358 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3359    \x{e0001}
3360 0: \x{e0001}
3361    \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3362 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3363\= Expect no match
3364    \x{09}
3365No match
3366    \x{0a}
3367No match
3368    \x{1D}
3369No match
3370    \x{20}
3371No match
3372    \x{85}
3373No match
3374    \x{a0}
3375No match
3376    \x{1680}
3377No match
3378    \x{2028}
3379No match
3380    \x{2029}
3381No match
3382    \x{202f}
3383No match
3384    \x{2065}
3385No match
3386    \x{3000}
3387No match
3388    \x{e0002}
3389No match
3390    \x{e001f}
3391No match
3392    \x{e0080}
3393No match
3394
3395/^[[:print:]]+$/utf,ucp
3396    Space: \x{a0}
3397 0: Space: \x{a0}
3398    \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
3399 0: \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
3400    \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
3401 0: \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
3402    \x{202f}\x{205f}
3403 0: \x{202f}\x{205f}
3404    \x{3000}
3405 0: \x{3000}
3406    Letter:ABC
3407 0: Letter:ABC
3408    Mark:\x{300}\x{1d172}\x{1d17b}
3409 0: Mark:\x{300}\x{1d172}\x{1d17b}
3410    Number:9\x{660}
3411 0: Number:9\x{660}
3412    Punctuation:\x{66a},;
3413 0: Punctuation:\x{66a},;
3414    Symbol:\x{6de}<>\x{fffc}
3415 0: Symbol:\x{6de}<>\x{fffc}
3416    Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3417 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3418    \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3419 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3420    \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3421 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3422    \x{202f}
3423 0: \x{202f}
3424    \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3425 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3426    \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3427 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3428    \x{feff}
3429 0: \x{feff}
3430    \x{fff9}\x{fffa}\x{fffb}
3431 0: \x{fff9}\x{fffa}\x{fffb}
3432    \x{110bd}
3433 0: \x{110bd}
3434    \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3435 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3436    \x{e0001}
3437 0: \x{e0001}
3438    \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3439 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3440\= Expect no match
3441    \x{09}
3442No match
3443    \x{1D}
3444No match
3445    \x{85}
3446No match
3447    \x{2028}
3448No match
3449    \x{2029}
3450No match
3451    \x{2065}
3452No match
3453    \x{e0002}
3454No match
3455    \x{e001f}
3456No match
3457    \x{e0080}
3458No match
3459
3460/^[[:punct:]]+$/utf,ucp
3461    \$+<=>^`|~
3462 0: $+<=>^`|~
3463    !\"#%&'()*,-./:;?@[\\]_{}
3464 0: !"#%&'()*,-./:;?@[\]_{}
3465    \x{a1}\x{a7}
3466 0: \x{a1}\x{a7}
3467    \x{37e}
3468 0: \x{37e}
3469\= Expect no match
3470    abcde
3471No match
3472
3473/^[[:^graph:]]+$/utf,ucp
3474    \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{1680}
3475 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{1680}
3476    \x{2028}\x{2029}\x{202f}\x{2065}
3477 0: \x{2028}\x{2029}\x{202f}\x{2065}
3478    \x{3000}\x{e0002}\x{e001f}\x{e0080}
3479 0: \x{3000}\x{e0002}\x{e001f}\x{e0080}
3480\= Expect no match
3481    Letter:ABC
3482No match
3483    Mark:\x{300}\x{1d172}\x{1d17b}
3484No match
3485    Number:9\x{660}
3486No match
3487    Punctuation:\x{66a},;
3488No match
3489    Symbol:\x{6de}<>\x{fffc}
3490No match
3491    Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3492No match
3493    \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3494No match
3495    \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3496No match
3497    \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3498No match
3499    \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3500No match
3501    \x{feff}
3502No match
3503    \x{fff9}\x{fffa}\x{fffb}
3504No match
3505    \x{110bd}
3506No match
3507    \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3508No match
3509    \x{e0001}
3510No match
3511    \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3512No match
3513
3514/^[[:^print:]]+$/utf,ucp
3515    \x{09}\x{1D}\x{85}\x{2028}\x{2029}\x{2065}
3516 0: \x{09}\x{1d}\x{85}\x{2028}\x{2029}\x{2065}
3517    \x{e0002}\x{e001f}\x{e0080}
3518 0: \x{e0002}\x{e001f}\x{e0080}
3519\= Expect no match
3520    Space: \x{a0}
3521No match
3522    \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
3523No match
3524    \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
3525No match
3526    \x{202f}\x{205f}
3527No match
3528    \x{3000}
3529No match
3530    Letter:ABC
3531No match
3532    Mark:\x{300}\x{1d172}\x{1d17b}
3533No match
3534    Number:9\x{660}
3535No match
3536    Punctuation:\x{66a},;
3537No match
3538    Symbol:\x{6de}<>\x{fffc}
3539No match
3540    Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
3541No match
3542    \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
3543No match
3544    \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
3545No match
3546    \x{202f}
3547No match
3548    \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
3549No match
3550    \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
3551No match
3552    \x{feff}
3553No match
3554    \x{fff9}\x{fffa}\x{fffb}
3555No match
3556    \x{110bd}
3557No match
3558    \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
3559No match
3560    \x{e0001}
3561No match
3562    \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
3563No match
3564
3565/^[[:^punct:]]+$/utf,ucp
3566    abcde
3567 0: abcde
3568\= Expect no match
3569    \$+<=>^`|~
3570No match
3571    !\"#%&'()*,-./:;?@[\\]_{}
3572No match
3573    \x{a1}\x{a7}
3574No match
3575    \x{37e}
3576No match
3577
3578/[RST]+/i,utf,ucp
3579    Ss\x{17f}
3580 0: Ss\x{17f}
3581
3582/[R-T]+/i,utf,ucp
3583    Ss\x{17f}
3584 0: Ss\x{17f}
3585
3586/[q-u]+/i,utf,ucp
3587    Ss\x{17f}
3588 0: Ss\x{17f}
3589
3590/^s?c/im,utf
3591    scat
3592 0: sc
3593
3594# The next four tests are for repeated caseless back references when the
3595# code unit length of the matched text is different to that of the original
3596# group in the UTF-8 case.
3597
3598/^(\x{23a})\1*(.)/i,utf
3599    \x{23a}\x{23a}\x{23a}\x{23a}
3600 0: \x{23a}\x{23a}\x{23a}\x{23a}
3601 1: \x{23a}
3602 2: \x{23a}
3603    \x{23a}\x{2c65}\x{2c65}\x{2c65}
3604 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
3605 1: \x{23a}
3606 2: \x{2c65}
3607    \x{23a}\x{23a}\x{2c65}\x{23a}
3608 0: \x{23a}\x{23a}\x{2c65}\x{23a}
3609 1: \x{23a}
3610 2: \x{23a}
3611
3612/^(\x{23a})\1*(..)/i,utf
3613    \x{23a}\x{2c65}\x{2c65}\x{2c65}
3614 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
3615 1: \x{23a}
3616 2: \x{2c65}\x{2c65}
3617    \x{23a}\x{23a}\x{2c65}\x{23a}
3618 0: \x{23a}\x{23a}\x{2c65}\x{23a}
3619 1: \x{23a}
3620 2: \x{2c65}\x{23a}
3621
3622/^(\x{23a})\1*(...)/i,utf
3623    \x{23a}\x{2c65}\x{2c65}\x{2c65}
3624 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
3625 1: \x{23a}
3626 2: \x{2c65}\x{2c65}\x{2c65}
3627    \x{23a}\x{23a}\x{2c65}\x{23a}
3628 0: \x{23a}\x{23a}\x{2c65}\x{23a}
3629 1: \x{23a}
3630 2: \x{23a}\x{2c65}\x{23a}
3631
3632/^(\x{23a})\1*(....)/i,utf
3633\= Expect no match
3634    \x{23a}\x{2c65}\x{2c65}\x{2c65}
3635No match
3636    \x{23a}\x{23a}\x{2c65}\x{23a}
3637No match
3638
3639/[A-`]/i,utf
3640    abcdefghijklmno
3641 0: a
3642
3643/[\S\V\H]/utf
3644
3645/[^\p{Any}]*+x/utf
3646    x
3647 0: x
3648
3649/[[:punct:]]/utf,ucp
3650    \x{b4}
3651No match
3652
3653/[[:^ascii:]]/utf,ucp
3654    \x{100}
3655 0: \x{100}
3656    \x{200}
3657 0: \x{200}
3658    \x{300}
3659 0: \x{300}
3660    \x{37e}
3661 0: \x{37e}
3662\= Expect no match
3663    aa
3664No match
3665    99
3666No match
3667
3668/[[:^ascii:]\w]/utf,ucp
3669    aa
3670 0: a
3671    99
3672 0: 9
3673    gg
3674 0: g
3675    \x{100}
3676 0: \x{100}
3677    \x{200}
3678 0: \x{200}
3679    \x{300}
3680 0: \x{300}
3681    \x{37e}
3682 0: \x{37e}
3683
3684/[\w[:^ascii:]]/utf,ucp
3685    aa
3686 0: a
3687    99
3688 0: 9
3689    gg
3690 0: g
3691    \x{100}
3692 0: \x{100}
3693    \x{200}
3694 0: \x{200}
3695    \x{300}
3696 0: \x{300}
3697    \x{37e}
3698 0: \x{37e}
3699
3700/[^[:ascii:]\W]/utf,ucp
3701    \x{100}
3702 0: \x{100}
3703    \x{200}
3704 0: \x{200}
3705\= Expect no match
3706    aa
3707No match
3708    99
3709No match
3710    gg
3711No match
3712    \x{37e}
3713No match
3714
3715/[^[:^ascii:]\d]/utf,ucp
3716    a
3717 0: a
3718    ~
3719 0: ~
3720    \a
3721 0: \x{07}
3722    \x{7f}
3723 0: \x{7f}
3724\= Expect no match
3725    0
3726No match
3727    \x{389}
3728No match
3729    \x{20ac}
3730No match
3731
3732/(?=.*b)\pL/
3733    11bb
3734 0: b
3735
3736/(?(?=.*b)(?=.*b)\pL|.*c)/
3737    11bb
3738 0: b
3739
3740/^\x{123}+?$/utf,no_auto_possess
3741    \x{123}\x{123}\x{123}
3742 0: \x{123}\x{123}\x{123}
3743
3744/^\x{123}+?$/i,utf,no_auto_possess
3745    \x{123}\x{122}\x{123}
3746 0: \x{123}\x{122}\x{123}
3747\= Expect no match
3748    \x{123}\x{124}\x{123}
3749No match
3750
3751/\N{U+1234}/utf
3752    \x{1234}
3753 0: \x{1234}
3754
3755/[\N{U+1234}]/utf
3756    \x{1234}
3757 0: \x{1234}
3758
3759# Test the full list of Unicode "Pattern White Space" characters that are to
3760# be ignored by /x. The pattern lines below may show up oddly in text editors
3761# or when listed to the screen. Note that characters such as U+2002, which are
3762# matched as space by \h and \v are *not* "Pattern White Space".
3763
3764/A…‎‏

B/x,utf
3765    AB
3766 0: AB
3767
3768/A B/x,utf
3769    A\x{2002}B
3770 0: A\x{2002}B
3771\= Expect no match
3772    AB
3773No match
3774
3775# -------
3776
3777/[^\x{100}-\x{ffff}]*[\x80-\xff]/utf
3778    \x{99}\x{99}\x{99}
3779 0: \x{99}\x{99}\x{99}
3780
3781/[^\x{100}-\x{ffff}ABC]*[\x80-\xff]/utf
3782    \x{99}\x{99}\x{99}
3783 0: \x{99}\x{99}\x{99}
3784
3785/[^\x{100}-\x{ffff}]*[\x80-\xff]/i,utf
3786    \x{99}\x{99}\x{99}
3787 0: \x{99}\x{99}\x{99}
3788
3789# Script run tests
3790
3791/^(*script_run:.{4})/utf
3792    abcd                               Latin x4
3793 0: abcd
3794    \x{2e80}\x{2fa1d}\x{3041}\x{30a1}  Han Han Hiragana Katakana
3795 0: \x{2e80}\x{2fa1d}\x{3041}\x{30a1}
3796    \x{3041}\x{30a1}\x{3007}\x{3007}   Hiragana Katakana Han Han
3797 0: \x{3041}\x{30a1}\x{3007}\x{3007}
3798    \x{30a1}\x{3041}\x{3007}\x{3007}   Katakana Hiragana Han Han
3799 0: \x{30a1}\x{3041}\x{3007}\x{3007}
3800    \x{1100}\x{2e80}\x{2e80}\x{1101}   Hangul Han Han Hangul
3801 0: \x{1100}\x{2e80}\x{2e80}\x{1101}
3802    \x{2e80}\x{3105}\x{2e80}\x{3105}   Han Bopomofo Han Bopomofo
3803 0: \x{2e80}\x{3105}\x{2e80}\x{3105}
3804    \x{02ea}\x{2e80}\x{2e80}\x{3105}   Bopomofo-Sk Han Han Bopomofo
3805 0: \x{2ea}\x{2e80}\x{2e80}\x{3105}
3806    \x{3105}\x{2e80}\x{2e80}\x{3105}   Bopomofo Han Han Bopomofo
3807 0: \x{3105}\x{2e80}\x{2e80}\x{3105}
3808    \x{0300}cd!                        Inherited Latin Latin Common
3809 0: \x{300}cd!
3810    \x{0391}12\x{03a9}                 Greek Common-digits Greek
3811 0: \x{391}12\x{3a9}
3812    \x{0400}12\x{fe2f}                 Cyrillic Common-digits Cyrillic
3813 0: \x{400}12\x{fe2f}
3814    \x{0531}12\x{fb17}                 Armenian Common-digits Armenian
3815 0: \x{531}12\x{fb17}
3816    \x{0591}12\x{fb4f}                 Hebrew Common-digits Hebrew
3817 0: \x{591}12\x{fb4f}
3818    \x{0600}12\x{1eef1}                Arabic Common-digits Arabic
3819 0: \x{600}12\x{1eef1}
3820    \x{0600}\x{0660}\x{0669}\x{1eef1}  Arabic Arabic-digits Arabic
3821 0: \x{600}\x{660}\x{669}\x{1eef1}
3822    \x{0700}12\x{086a}                 Syriac Common-digits Syriac
3823 0: \x{700}12\x{86a}
3824    \x{1200}12\x{ab2e}                 Ethiopic Common-digits Ethiopic
3825 0: \x{1200}12\x{ab2e}
3826    \x{1680}12\x{169c}                 Ogham Common-digits Ogham
3827 0: \x{1680}12\x{169c}
3828    \x{3041}12\x{3041}                 Hiragana Common-digits Hiragana
3829 0: \x{3041}12\x{3041}
3830    \x{0980}\x{09e6}\x{09e7}\x{0993}   Bengali Bengali-digits Bengali
3831 0: \x{980}\x{9e6}\x{9e7}\x{993}
3832    !cde                               Common Latin Latin Latin
3833 0: !cde
3834    A..B                               Latin Common Common Latin
3835 0: A..B
3836    0abc                               Ascii-digit Latin Latin Latin
3837 0: 0abc
3838    1\x{0700}\x{0700}\x{0700}          Ascii-digit Syriac x 3
3839 0: 1\x{700}\x{700}\x{700}
3840    \x{1A80}\x{1A80}\x{1a40}\x{1a41}   Tai Tham Hora digits, letters
3841 0: \x{1a80}\x{1a80}\x{1a40}\x{1a41}
3842\= Expect no match
3843    a\x{370}bcd                        Latin Greek Latin Latin
3844No match
3845    \x{1100}\x{02ea}\x{02ea}\x{02ea}   Hangul Bopomofo x3
3846No match
3847    \x{02ea}\x{02ea}\x{02ea}\x{1100}   Bopomofo x3 Hangul
3848No match
3849    \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul
3850No match
3851    \x{0391}\x{09e6}\x{09e7}\x{03a9}   Greek Bengali digits Greek
3852No match
3853    \x{0600}7\x{0669}\x{1eef1}         Arabic ascii-digit Arabic-digit Arabic
3854No match
3855    \x{0600}\x{0669}7\x{1eef1}         Arabic Arabic-digit ascii-digit Arabic
3856No match
3857    A5\x{ff19}B                        Latin Common-ascii/notascii-digits Latin
3858No match
3859    \x{0300}cd\x{0391}                 Inherited Latin Latin Greek
3860No match
3861    !cd\x{0391}                        Common Latin Latin Greek
3862No match
3863    \x{1A80}\x{1A90}\x{1a40}\x{1a41}   Tai Tham Hora digit, Tham digit, letters
3864No match
3865    A\x{1d7ce}\x{1d7ff}B               Common fancy-common-2-sets-digits Common
3866No match
3867    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3868No match
3869
3870/^(*sr:.{4}|..)/utf
3871    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3872 0: \x{2e80}\x{3105}
3873
3874/^(*atomic_script_run:.{4}|..)/utf
3875\= Expect no match
3876    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3877No match
3878
3879/^(*asr:.*)/utf
3880\= Expect no match
3881    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3882No match
3883
3884/^(?>(*sr:.*))/utf
3885    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3886 0: \x{2e80}\x{3105}\x{2e80}
3887
3888/^(*sr:.*)/utf
3889    \x{2e80}\x{3105}\x{2e80}\x{30a1}   Han Bopomofo Han Katakana
3890 0: \x{2e80}\x{3105}\x{2e80}
3891    \x{10fffd}\x{10fffd}\x{10fffd}     Private use (Unknown)
3892 0: \x{10fffd}
3893
3894/^(*sr:\x{2e80}*)/utf
3895    \x{2e80}\x{2e80}\x{3105}           Han Han Bopomofo
3896 0: \x{2e80}\x{2e80}
3897
3898/^(*sr:\x{2e80}*)\x{2e80}/utf
3899    \x{2e80}\x{2e80}\x{3105}           Han Han Bopomofo
3900 0: \x{2e80}\x{2e80}
3901
3902/^(*sr:.*)Test/utf
3903    Test script run on an empty string
3904 0: Test
3905
3906/^(*sr:(.{2})){2}/utf
3907    \x{0600}7\x{0669}\x{1eef1}         Arabic ascii-digit Arabic-digit Arabic
3908 0: \x{600}7\x{669}\x{1eef1}
3909 1: \x{669}\x{1eef1}
3910    \x{1A80}\x{1A80}\x{1a40}\x{1a41}   Tai Tham Hora digits, letters
3911 0: \x{1a80}\x{1a80}\x{1a40}\x{1a41}
3912 1: \x{1a40}\x{1a41}
3913    \x{1A80}\x{1a40}\x{1A90}\x{1a41}   Tai Tham Hora digit, letter, Tham digit, letter
3914 0: \x{1a80}\x{1a40}\x{1a90}\x{1a41}
3915 1: \x{1a90}\x{1a41}
3916\= Expect no match
3917    \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul
3918No match
3919
3920/^(*sr:\S*)/utf
3921    \x{1cf4}\x{20f0}\x{900}\x{11305}   [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Gran
3922 0: \x{1cf4}\x{20f0}\x{900}
3923    \x{1cf4}\x{20f0}\x{11305}\x{900}   [Dev,Gran,Kan] [Dev,Gran,Lat] Gran Dev
3924 0: \x{1cf4}\x{20f0}\x{11305}
3925    \x{1cf4}\x{20f0}\x{900}ABC         [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Lat
3926 0: \x{1cf4}\x{20f0}\x{900}
3927    \x{1cf4}\x{20f0}ABC                [Dev,Gran,Kan] [Dev,Gran,Lat] Lat
3928 0: \x{1cf4}\x{20f0}
3929    \x{20f0}ABC                        [Dev,Gran,Lat] Lat
3930 0: \x{20f0}ABC
3931    XYZ\x{20f0}ABC                     Lat [Dev,Gran,Lat] Lat
3932 0: XYZ\x{20f0}ABC
3933    \x{a36}\x{a33}\x{900}              [Dev,...] [Dev,...] Dev
3934 0: \x{a36}\x{a33}
3935    \x{3001}\x{2e80}\x{3041}\x{30a1}   [Bopo, Han, etc] Han Hira Kata
3936 0: \x{3001}\x{2e80}\x{3041}\x{30a1}
3937    \x{3001}\x{30a1}\x{2e80}\x{3041}   [Bopo, Han, etc] Kata Han Hira
3938 0: \x{3001}\x{30a1}\x{2e80}\x{3041}
3939    \x{3001}\x{3105}\x{2e80}\x{1101}   [Bopo, Han, etc] Bopomofo Han Hangul
3940 0: \x{3001}\x{3105}\x{2e80}
3941    \x{3105}\x{3001}\x{2e80}\x{1101}   Bopomofo [Bopo, Han, etc] Han Hangul
3942 0: \x{3105}\x{3001}\x{2e80}
3943    \x{3031}\x{3041}\x{30a1}\x{2e80}   [Hira Kata] Hira Kata Han
3944 0: \x{3031}\x{3041}\x{30a1}\x{2e80}
3945    \x{060c}\x{06d4}\x{0600}\x{10d00}\x{0700}  [Arab Rohg Syrc Thaa] [Arab Rohg] Arab Rohg Syrc
3946 0: \x{60c}\x{6d4}\x{600}
3947    \x{060c}\x{06d4}\x{0700}\x{0600}\x{10d00}  [Arab Rohg Syrc Thaa] [Arab Rohg] Syrc Arab Rohg
3948 0: \x{60c}\x{6d4}
3949    \x{2e80}\x{3041}\x{3001}\x{3031}\x{2e80}   Han Hira [Bopo, Han, etc] [Hira Kata] Han
3950 0: \x{2e80}\x{3041}\x{3001}\x{3031}\x{2e80}
3951
3952/(?<!)(*sr:)/
3953
3954/(?<!X(*sr:B)C)/
3955
3956/(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
3957    abcXBCYZ!
3958 0: !
3959
3960/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
3961   abcXBXYCCC!
3962 0: !
3963
3964/^(*sr:\S*)/utf
3965    \x{10d00}\x{10d00}\x{06d4}     Rohingya Rohingya Arabic-full-stop
3966 0: \x{10d00}\x{10d00}\x{6d4}
3967    \x{06d4}\x{10d00}\x{10d00}     Arabic-full-stop Rohingya Rohingya
3968 0: \x{6d4}\x{10d00}\x{10d00}
3969    \x{10d00}\x{10d00}\x{0363}     Rohingya Rohingya Inherited-extend-Latin
3970 0: \x{10d00}\x{10d00}
3971    \x{0363}\x{10d00}\x{10d00}     Inherited-extend-Latin Rohingya Rohingya
3972 0: \x{363}
3973    AB\x{0363}                     Latin Latin Inherited-extend-Latin
3974 0: AB\x{363}
3975    \x{0363}AB                     Inherited-extend-Latin Latin Latin
3976 0: \x{363}AB
3977    AB\x{1cf7}                     Latin Latin Common-extended-Beng
3978 0: AB
3979    \x{1cf7}AB                     Common-extend-Beng Latin Latin
3980 0: \x{1cf7}
3981    \x{1cf7}\x{0993}               Common-extend-Beng Bengali
3982 0: \x{1cf7}\x{993}
3983    A\x{1abe}BC                    Test enclosing mark
3984 0: A\x{1abe}BC
3985    \x{0370}\x{1abe}\x{0371}       Which can occur with any script (Greek here)
3986 0: \x{370}\x{1abe}\x{371}
3987    \x{3001}\x{adf9}\x{3001}       [.. Hangul ..] Hangul [.. Hangul ..]
3988 0: \x{3001}\x{adf9}\x{3001}
3989    \x{3400}\x{3001}XXX            Han [Han etc.]
3990 0: \x{3400}\x{3001}
3991    \x{3400}\x{1cd5}               Han [Bengali Devanagari]
3992 0: \x{3400}
3993    \x{ac01}\x{3400}               Hangul [.. Hangul ..]
3994 0: \x{ac01}\x{3400}
3995    \x{ac01}\x{1cd5}               Hangul [Bengali Devanagari]
3996 0: \x{ac01}
3997    \x{102e0}\x{06d4}\x{1ee4d}     [Arabic Coptic] [Arab Rohingya] Arabic
3998 0: \x{102e0}\x{6d4}\x{1ee4d}
3999    \x{102e0}\x{06d4}\x{2cc9}      [Arabic Coptic] [Arab Rohingya] Coptic
4000 0: \x{102e0}\x{6d4}
4001    \x{102e0}\x{06d4}\x{10d30}     [Arabic Coptic] [Arab Rohingya] Rohingya
4002 0: \x{102e0}\x{6d4}
4003
4004# Test loop breaking for empty string match
4005
4006/^(*sr:A|)*BCD/utf
4007    AABCD
4008 0: AABCD
4009    ABCD
4010 0: ABCD
4011    BCD
4012 0: BCD
4013
4014# The use of (*ACCEPT) breaks script run checking
4015
4016/^(*sr:.*(*ACCEPT)ZZ)/utf
4017    \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul
4018 0: \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul
4019
4020# -------
4021
4022# Test group names containing non-ASCII letters and digits
4023
4024/(?'ABáC'...)\g{ABáC}/utf
4025    abcabcdefg
4026 0: abcabc
4027 1: abc
4028
4029/(?'XʰABC'...)/utf
4030    xyzpq
4031 0: xyz
4032 1: xyz
4033
4034/(?'XאABC'...)/utf
4035    12345
4036 0: 123
4037 1: 123
4038
4039/(?'XᾈABC'...)/utf
4040    %^&*(...
4041 0: %^&
4042 1: %^&
4043
4044/(?'��ABC'...)/utf
4045    abcde
4046 0: abc
4047 1: abc
4048
4049/^(?'אABC'...)(?&אABC)(?P=אABC)/utf
4050    123123123456
4051 0: 123123123
4052 1: 123
4053
4054/^(?'אABC'...)(?&אABC)/utf
4055    123123123456
4056 0: 123123
4057 1: 123
4058
4059/\X*/
4060    \xF3aaa\xE4\xEA\xEB\xFEa
4061 0: \xf3aaa\xe4\xea\xeb\xfea
4062
4063/Я/i,utf
4064    \x{42f}
4065 0: \x{42f}
4066    \x{44f}
4067 0: \x{44f}
4068
4069/(?=Я)/i,utf
4070    \x{42f}
4071 0:
4072    \x{44f}
4073 0:
4074
4075# -----------------------------------------------------------------------------
4076# Tests for bidi control and bidi class properties.
4077
4078/\p{ bidi_control }/utf
4079    -->\x{202c}<--
4080 0: \x{202c}
4081
4082/\p{bidicontrol}+/utf
4083    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4084 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
4085    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4086 0: \x{2066}\x{2067}\x{2068}\x{2069}
4087
4088/\p{bidic}+?/utf
4089    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4090 0: \x{61c}
4091    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4092 0: \x{2066}
4093
4094/\p{bidi_control}++/utf
4095    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4096 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
4097    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4098 0: \x{2066}\x{2067}\x{2068}\x{2069}
4099
4100/[\p{bidi_c}]/utf
4101    -->\x{202c}<--
4102 0: \x{202c}
4103
4104/[\p{bidicontrol}]+/utf
4105    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4106 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
4107    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4108 0: \x{2066}\x{2067}\x{2068}\x{2069}
4109
4110/[\p{bidicontrol}]+?/utf
4111    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4112 0: \x{61c}
4113    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4114 0: \x{2066}
4115
4116/[\p{bidicontrol}]++/utf
4117    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4118 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
4119    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4120 0: \x{2066}\x{2067}\x{2068}\x{2069}
4121
4122/[\p{bidicontrol}<>]+/utf
4123    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4124 0: >\x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<
4125    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4126 0: >\x{2066}\x{2067}\x{2068}\x{2069}<
4127
4128/\P{bidicontrol}+/g,utf
4129    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4130 0: -->
4131 0: <--
4132    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4133 0: -->
4134 0: <--
4135
4136/\p{^bidicontrol}+/g,utf
4137    -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
4138 0: -->
4139 0: <--
4140    -->\x{2066}\x{2067}\x{2068}\x{2069}<--
4141 0: -->
4142 0: <--
4143
4144/\p{bidi class = al}/utf
4145    -->\x{061D}<--
4146 0: \x{61d}
4147
4148/\p{bc = al}+/utf
4149    -->\x{061D}\x{061e}\x{061f}<--
4150 0: \x{61d}\x{61e}\x{61f}
4151
4152/\p{bidi_class : AL}+?/utf
4153    -->\x{061D}\x{061e}\x{061f}<--
4154 0: \x{61d}
4155
4156/\p{Bidi_Class : AL}++/utf
4157    -->\x{061D}\x{061e}\x{061f}<--
4158 0: \x{61d}\x{61e}\x{61f}
4159
4160/\p{b_c = aN}+/utf
4161    -->\x{061D}\x{0602}\x{0604}\x{061f}<--
4162 0: \x{602}\x{604}
4163
4164/\p{bidi class = B}+/utf
4165    -->\x{0a}\x{0d}\x{01c}\x{01e}\x{085}\x{2029}<--
4166 0: \x{0a}\x{0d}\x{1c}\x{1e}\x{85}\x{2029}
4167
4168/\p{bidi class:BN}+/utf
4169    -->\x{0}\x{08}\x{200c}\x{fffe}\x{dfffe}\x{10ffff}<--
4170 0: \x{00}\x{08}\x{200c}\x{fffe}\x{dfffe}\x{10ffff}
4171
4172/\p{bidiclass:cs}+/utf
4173    -->,.\x{060c}\x{ff1a}<--
4174 0: ,.\x{60c}\x{ff1a}
4175
4176/\p{bidiclass:En}+/utf
4177    -->09\x{b2}\x{2074}\x{1fbf9}<--
4178 0: 09\x{b2}\x{2074}\x{1fbf9}
4179
4180/\p{bidiclass:es}+/utf
4181    ==>+-\x{207a}\x{ff0d}<==
4182 0: +-\x{207a}\x{ff0d}
4183
4184/\p{bidiclass:et}+/utf
4185    -->#\{24}%\x{a2}\x{A838}\x{1e2ff}<--
4186 0: #
4187
4188/\p{bidiclass:FSI}+/utf
4189    -->\x{2068}<--
4190 0: \x{2068}
4191
4192/\p{bidi class:L}+/utf
4193    -->ABC<--
4194 0: ABC
4195
4196/\P{bidi class:L}+/utf
4197    -->ABC<--
4198 0: -->
4199
4200/\p{bidi class:LRE}+\p{bidiclass=lri}*\p{bidiclass:lro}/utf
4201    -->\x{202a}\x{2066}\x{202d}<--
4202 0: \x{202a}\x{2066}\x{202d}
4203
4204/\p{bidi class:NSM}+/utf
4205    -->\x{9bc}\x{a71}\x{e31}<--
4206 0: \x{9bc}\x{a71}\x{e31}
4207
4208/\p{bidi class:ON}+/utf
4209    -->\x{21}'()*;@\x{384}\x{2039}<=-
4210 0: >!'()*;@\x{384}\x{2039}<=
4211
4212/\p{bidiclass:pdf}\p{bidiclass:pdi}/utf
4213    -->\x{202c}\x{2069}<--
4214 0: \x{202c}\x{2069}
4215
4216/\p{bidi class:R}+/utf
4217    -->\x{590}\x{5c6}\x{200f}\x{10805}<--
4218 0: \x{590}\x{5c6}\x{200f}\x{10805}
4219
4220/\p{bidi class:RLE}+\p{bidi class:RLI}*\p{bidi class:RLO}+/utf
4221    -->\x{202b}\x{2067}\x{202e}<--
4222 0: \x{202b}\x{2067}\x{202e}
4223
4224/\p{bidi class:S}+\p{bidiclass:WS}+/utf
4225    -->\x{9}\x{b}\x{1f}  \x{c} \x{2000} \x{3000}<--
4226 0: \x{09}\x{0b}\x{1f}  \x{0c} \x{2000} \x{3000}
4227
4228# -----------------------------------------------------------------------------
4229
4230/[\p{taml}\p{sc:ugar}]+/utf
4231    \x{0b82}\x{10380}
4232 0: \x{b82}\x{10380}
4233
4234/^[\p{sc:Arabic}]/utf
4235\= Expect no match
4236    \x{650}
4237No match
4238    \x{651}
4239No match
4240    \x{652}
4241No match
4242    \x{653}
4243No match
4244    \x{654}
4245No match
4246    \x{655}
4247No match
4248
4249# -----------------------------------------------------------------------------
4250# Tests for newly-added Boolean Properties
4251
4252/\p{ahex}\p{asciihexdigit}/utf
4253    >4F<
4254 0: 4F
4255
4256/\p{alpha}\p{alphabetic}/g,utf
4257    >AB<>\x{148}\x{1234}
4258 0: AB
4259 0: \x{148}\x{1234}
4260
4261/\p{ascii}\p{ascii}/g,utf
4262    >AB<>\x{148}\x{1234}
4263 0: >A
4264 0: B<
4265
4266/\p{Bidi_C}\p{bidicontrol}/g,utf
4267    >\x{202d}\x{2069}<
4268 0: \x{202d}\x{2069}
4269
4270/\p{Bidi_M}\p{bidimirrored}/g,utf
4271    >\x{202d}\x{2069}<>\x{298b}\x{bb}<
4272 0: <>
4273 0: \x{298b}\x{bb}
4274
4275/\p{cased}\p{cased}/g,utf
4276    >AN<>\x{149}\x{120}<
4277 0: AN
4278 0: \x{149}\x{120}
4279
4280/\p{caseignorable}\p{ci}/g,utf
4281    >AN<>\x{60}\x{859}<
4282 0: `\x{859}
4283
4284/\p{changeswhencasefolded}\p{cwcf}/g,utf
4285    >AN<>\x{149}\x{120}<
4286 0: AN
4287 0: \x{149}\x{120}
4288
4289/\p{changeswhencasemapped}\p{cwcm}/g,utf
4290    >AN<>\x{149}\x{120}<
4291 0: AN
4292 0: \x{149}\x{120}
4293
4294/\p{changeswhenlowercased}\p{cwl}/g,utf
4295    >AN<>\x{149}\x{120}<>yz<
4296 0: AN
4297
4298/\p{changeswhenuppercased}\p{cwu}/g,utf
4299    >AN<>\x{149}\x{120}<>yz<
4300 0: yz
4301
4302/\p{changeswhentitlecased}\p{cwt}/g,utf
4303    >AN<>\x{149}\x{120}<>yz<
4304 0: yz
4305
4306/\p{dash}\p{dash}/g,utf
4307    >\x{2d}\x{1400}<>yz<
4308 0: -\x{1400}
4309
4310/\p{defaultignorablecodepoint}\p{di}/g,utf
4311    >AN<>\x{ad}\x{e0fff}<>yz<
4312 0: \x{ad}\x{e0fff}
4313
4314/\p{deprecated}\p{dep}/g,utf
4315    >AN<>\x{149}\x{e0001}<>yz<
4316 0: \x{149}\x{e0001}
4317
4318/\p{diacritic}\p{dia}/g,utf
4319    >AN<>\x{f84}\x{5e}<>yz<
4320 0: \x{f84}^
4321
4322/\p{emojicomponent}\p{ecomp}/g,utf
4323    >AN<>\x{200d}\x{e007f}<>yz<
4324 0: \x{200d}\x{e007f}
4325
4326/\p{emojimodifier}\p{emod}/g,utf
4327    >AN<>\x{1f3fb}\x{1f3ff}<>yz<
4328 0: \x{1f3fb}\x{1f3ff}
4329
4330/\p{emojipresentation}\p{epres}/g,utf
4331    >AN<>\x{2653}\x{1f6d2}<>yz<
4332 0: \x{2653}\x{1f6d2}
4333
4334/\p{extender}\p{ext}/g,utf
4335    >AN<>\x{1e944}\x{b7}<>yz<
4336 0: \x{1e944}\x{b7}
4337
4338/\p{extendedpictographic}\p{extpict}/g,utf
4339    >AN<>\x{26cf}\x{ae}<>yz<
4340 0: \x{26cf}\x{ae}
4341
4342/\p{graphemebase}\p{grbase}/g,utf
4343    >AN<>\x{10f}\x{60}<>yz<
4344 0: >A
4345 0: N<
4346 0: >\x{10f}
4347 0: `<
4348 0: >y
4349 0: z<
4350
4351/\p{graphemeextend}\p{grext}/g,utf
4352    >AN<>\x{300}\x{b44}<>yz<
4353 0: \x{300}\x{b44}
4354
4355/\p{hexdigit}\p{hex}/g,utf
4356    >AF23<>\x{ff46}\x{ff10}<>yz<
4357 0: AF
4358 0: 23
4359 0: \x{ff46}\x{ff10}
4360
4361/\p{idcontinue}\p{idc}/g,utf
4362    >AF23<>\x{146}\x{7a}<>yz<
4363 0: AF
4364 0: 23
4365 0: \x{146}z
4366 0: yz
4367
4368/\p{ideographic}\p{ideo}/g,utf
4369    >AF23<>\x{30000}\x{3006}<>yz<
4370 0: \x{30000}\x{3006}
4371
4372/\p{idstart}\p{ids}/g,utf
4373    >AF23<>\x{146}\x{7a}<>yz<
4374 0: AF
4375 0: \x{146}z
4376 0: yz
4377
4378/\p{idsbinaryoperator}\p{idsb}/g,utf
4379    >AF23<>\x{2ff0}\x{2ffb}<>yz<\x{2ff2}\x{2ff1}
4380 0: \x{2ff0}\x{2ffb}
4381
4382/\p{idstrinaryoperator}\p{idst}/g,utf
4383    >AF23<>\x{2ff2}\x{2ff3}<>yz<
4384 0: \x{2ff2}\x{2ff3}
4385
4386/\p{Join Control}\p{joinc}/g,utf
4387    >AF23<>\x{200c}\x{200d}<>yz<
4388 0: \x{200c}\x{200d}
4389
4390/\p{logical_order_exception}\p{loe}/g,utf
4391    >AF23<>\x{e40}\x{aabc}<>yz<
4392 0: \x{e40}\x{aabc}
4393
4394/\p{Lowercase}\p{lower}/g,utf
4395    >AF23<>\x{146}\x{7a}<>yz<
4396 0: \x{146}z
4397 0: yz
4398
4399/\p{math}\p{math}/g,utf
4400    >AF23<>\x{2215}\x{2b}<>yz<
4401 0: <>
4402 0: \x{2215}+
4403 0: <>
4404
4405/\p{Non Character Code Point}\p{nchar}/g,utf
4406    >AF23<>\x{10ffff}\x{fdd0}<>yz<
4407 0: \x{10ffff}\x{fdd0}
4408
4409/\p{patternsyntax}\p{patsyn}/g,utf
4410    >AF23<>\x{21cd}\x{21}<>yz<
4411 0: <>
4412 0: \x{21cd}!
4413 0: <>
4414
4415/\p{patternwhitespace}\p{patws}/g,utf
4416    >AF23<>\x{2029}\x{85}<>yz<
4417 0: \x{2029}\x{85}
4418
4419/\p{prependedconcatenationmark}\p{pcm}/g,utf
4420    >AF23<>\x{600}\x{110cd}<>yz<
4421 0: \x{600}\x{110cd}
4422
4423/\p{quotationmark}\p{qmark}/g,utf
4424    >AF23<>\x{ff63}\x{22}<>yz<
4425 0: \x{ff63}"
4426
4427/\p{radical}\p{radical}/g,utf
4428    >AF23<>\x{2fd5}\x{2e80}<>yz<
4429 0: \x{2fd5}\x{2e80}
4430
4431/\p{regionalindicator}\p{ri}/g,utf
4432    >AF23<>\x{1f1e6}\x{1f1ff}<>yz<
4433 0: \x{1f1e6}\x{1f1ff}
4434
4435/=\p{whitespace}\p{space}\p{wspace}=/g,utf
4436    >AF23<=\x{d}\x{1680}\x{3000}=>yz<
4437 0: =\x{0d}\x{1680}\x{3000}=
4438
4439/\p{sentenceterminal}\p{sterm}/g,utf
4440    >AF23<>\x{1da88}\x{2e}<>yz<
4441 0: \x{1da88}.
4442
4443/\p{terminalpunctuation}\p{term}/g,utf
4444    >AF23<>\x{1da88}\x{2e}<>yz<
4445 0: \x{1da88}.
4446
4447/\p{unified ideograph}\p{uideo}/g,utf
4448    >AF23<>\x{30000}\x{3400}<>yz<
4449 0: \x{30000}\x{3400}
4450
4451/\p{UPPERcase}\p{upper}/g,utf
4452    >AF23<>\x{146}\x{7a}<>yz<
4453 0: AF
4454
4455/\p{variationselector}\p{vs}/g,utf
4456    >AF23<>\x{180b}\x{e01ef}<>yz<
4457 0: \x{180b}\x{e01ef}
4458
4459/\p{xidcontinue}\p{xidc}/g,utf
4460    >AF23<>\x{146}\x{30}<>yz<
4461 0: AF
4462 0: 23
4463 0: \x{146}0
4464 0: yz
4465
4466# -----------------------------------------------------------------------------
4467
4468# End of testinput4
4469