• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This set of tests checks the API, internals, and non-Perl stuff for UTF
2# support, including Unicode properties. However, tests that give different
3# results in 8-bit, 16-bit, and 32-bit modes are excluded (see tests 10 and
4# 12).
5
6# PCRE2 and Perl disagree about the characteristics of certain Unicode
7# characters. For example, 061C is considered by Perl to be Arabic, though
8# is it not listed as such in the Unicode Scripts.txt file, and 2066-2069 are
9# graphic and printable according to Perl, though they are actually "isolate"
10# control characters. That is why the following tests are here rather than in
11# test 4.
12
13/^[\p{Arabic}]/utf
14\= Expect no match
15    \x{061c}
16No match
17
18/^[[:graph:]]+$/utf,ucp
19\= Expect no match
20    \x{61c}
21No match
22    \x{2066}
23No match
24    \x{2067}
25No match
26    \x{2068}
27No match
28    \x{2069}
29No match
30
31/^[[:print:]]+$/utf,ucp
32\= Expect no match
33    \x{61c}
34No match
35    \x{2066}
36No match
37    \x{2067}
38No match
39    \x{2068}
40No match
41    \x{2069}
42No match
43
44/^[[:^graph:]]+$/utf,ucp
45    \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}
46 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}
47    \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}
48 0: \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}
49
50/^[[:^print:]]+$/utf,ucp
51    \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
52 0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
53    \x{2068}\x{2069}
54 0: \x{2068}\x{2069}
55
56# Perl does not consider U+180e to be a space character. It is true that it
57# does not appear in the Unicode PropList.txt file as such, but in many other
58# sources it is listed as a space, and has been treated as such in PCRE for
59# a long time.
60
61/^>[[:blank:]]*/utf,ucp
62    >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
63 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09}
64
65/^A\s+Z/utf,ucp
66    A\x{85}\x{180e}\x{2005}Z
67 0: A\x{85}\x{180e}\x{2005}Z
68
69/^A[\s]+Z/utf,ucp
70    A\x{2005}Z
71 0: A\x{2005}Z
72    A\x{85}\x{2005}Z
73 0: A\x{85}\x{2005}Z
74
75/^[[:graph:]]+$/utf,ucp
76\= Expect no match
77    \x{180e}
78No match
79
80/^[[:print:]]+$/utf,ucp
81    \x{180e}
82 0: \x{180e}
83
84/^[[:^graph:]]+$/utf,ucp
85    \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e}
86 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}\x{180e}
87
88/^[[:^print:]]+$/utf,ucp
89\= Expect no match
90    \x{180e}
91No match
92
93# End of U+180E tests.
94
95# ---------------------------------------------------------------------
96
97/\x{110000}/IB,utf
98Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
99
100/\o{4200000}/IB,utf
101Failed: error 134 at offset 10: character code point value in \x{} or \o{} is too large
102
103/\x{ffffffff}/utf
104Failed: error 134 at offset 11: character code point value in \x{} or \o{} is too large
105
106/\o{37777777777}/utf
107Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
108
109/\x{100000000}/utf
110Failed: error 134 at offset 12: character code point value in \x{} or \o{} is too large
111
112/\o{77777777777}/utf
113Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
114
115/\x{d800}/utf
116Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
117
118/\o{154000}/utf
119Failed: error 173 at offset 9: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
120
121/\x{dfff}/utf
122Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
123
124/\o{157777}/utf
125Failed: error 173 at offset 9: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
126
127/\x{d7ff}/utf
128
129/\o{153777}/utf
130
131/\x{e000}/utf
132
133/\o{170000}/utf
134
135/^\x{100}a\x{1234}/utf
136    \x{100}a\x{1234}bcd
137 0: \x{100}a\x{1234}
138
139/\x{0041}\x{2262}\x{0391}\x{002e}/IB,utf
140------------------------------------------------------------------
141        Bra
142        A\x{2262}\x{391}.
143        Ket
144        End
145------------------------------------------------------------------
146Capturing subpattern count = 0
147Options: utf
148First code unit = 'A'
149Last code unit = '.'
150Subject length lower bound = 4
151    \x{0041}\x{2262}\x{0391}\x{002e}
152 0: A\x{2262}\x{391}.
153
154/.{3,5}X/IB,utf
155------------------------------------------------------------------
156        Bra
157        Any{3}
158        Any{0,2}
159        X
160        Ket
161        End
162------------------------------------------------------------------
163Capturing subpattern count = 0
164Options: utf
165Last code unit = 'X'
166Subject length lower bound = 4
167    \x{212ab}\x{212ab}\x{212ab}\x{861}X
168 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
169
170/.{3,5}?/IB,utf
171------------------------------------------------------------------
172        Bra
173        Any{3}
174        Any{0,2}?
175        Ket
176        End
177------------------------------------------------------------------
178Capturing subpattern count = 0
179Options: utf
180Subject length lower bound = 3
181    \x{212ab}\x{212ab}\x{212ab}\x{861}
182 0: \x{212ab}\x{212ab}\x{212ab}
183
184/^[ab]/IB,utf
185------------------------------------------------------------------
186        Bra
187        ^
188        [ab]
189        Ket
190        End
191------------------------------------------------------------------
192Capturing subpattern count = 0
193Compile options: utf
194Overall options: anchored utf
195Subject length lower bound = 1
196    bar
197 0: b
198\= Expect no match
199    c
200No match
201    \x{ff}
202No match
203    \x{100}
204No match
205
206/^[^ab]/IB,utf
207------------------------------------------------------------------
208        Bra
209        ^
210        [\x00-`c-\xff] (neg)
211        Ket
212        End
213------------------------------------------------------------------
214Capturing subpattern count = 0
215Compile options: utf
216Overall options: anchored utf
217Subject length lower bound = 1
218    c
219 0: c
220    \x{ff}
221 0: \x{ff}
222    \x{100}
223 0: \x{100}
224\= Expect no match
225    aaa
226No match
227
228/\x{100}*(\d+|"(?1)")/utf
229    1234
230 0: 1234
231 1: 1234
232    "1234"
233 0: "1234"
234 1: "1234"
235    \x{100}1234
236 0: \x{100}1234
237 1: 1234
238    "\x{100}1234"
239 0: \x{100}1234
240 1: 1234
241    \x{100}\x{100}12ab
242 0: \x{100}\x{100}12
243 1: 12
244    \x{100}\x{100}"12"
245 0: \x{100}\x{100}"12"
246 1: "12"
247\= Expect no match
248    \x{100}\x{100}abcd
249No match
250
251/\x{100}*/IB,utf
252------------------------------------------------------------------
253        Bra
254        \x{100}*+
255        Ket
256        End
257------------------------------------------------------------------
258Capturing subpattern count = 0
259May match empty string
260Options: utf
261Subject length lower bound = 0
262
263/a\x{100}*/IB,utf
264------------------------------------------------------------------
265        Bra
266        a
267        \x{100}*+
268        Ket
269        End
270------------------------------------------------------------------
271Capturing subpattern count = 0
272Options: utf
273First code unit = 'a'
274Subject length lower bound = 1
275
276/ab\x{100}*/IB,utf
277------------------------------------------------------------------
278        Bra
279        ab
280        \x{100}*+
281        Ket
282        End
283------------------------------------------------------------------
284Capturing subpattern count = 0
285Options: utf
286First code unit = 'a'
287Last code unit = 'b'
288Subject length lower bound = 2
289
290/[\x{200}-\x{100}]/utf
291Failed: error 108 at offset 15: range out of order in character class
292
293/[Ā-Ą]/utf
294    \x{100}
295 0: \x{100}
296    \x{104}
297 0: \x{104}
298\= Expect no match
299    \x{105}
300No match
301    \x{ff}
302No match
303
304/[\xFF]/IB
305------------------------------------------------------------------
306        Bra
307        \x{ff}
308        Ket
309        End
310------------------------------------------------------------------
311Capturing subpattern count = 0
312First code unit = \xff
313Subject length lower bound = 1
314    >\xff<
315 0: \xff
316
317/[^\xFF]/IB
318------------------------------------------------------------------
319        Bra
320        [^\x{ff}]
321        Ket
322        End
323------------------------------------------------------------------
324Capturing subpattern count = 0
325Subject length lower bound = 1
326
327/[Ä-Ü]/utf
328    Ö # Matches without Study
329 0: \x{d6}
330    \x{d6}
331 0: \x{d6}
332
333/[Ä-Ü]/utf
334    Ö <-- Same with Study
335 0: \x{d6}
336    \x{d6}
337 0: \x{d6}
338
339/[\x{c4}-\x{dc}]/utf
340    Ö # Matches without Study
341 0: \x{d6}
342    \x{d6}
343 0: \x{d6}
344
345/[\x{c4}-\x{dc}]/utf
346    Ö <-- Same with Study
347 0: \x{d6}
348    \x{d6}
349 0: \x{d6}
350
351/[^\x{100}]abc(xyz(?1))/IB,utf
352------------------------------------------------------------------
353        Bra
354        [^\x{100}]
355        abc
356        CBra 1
357        xyz
358        Recurse
359        Ket
360        Ket
361        End
362------------------------------------------------------------------
363Capturing subpattern count = 1
364Options: utf
365Last code unit = 'z'
366Subject length lower bound = 7
367
368/(\x{100}(b(?2)c))?/IB,utf
369------------------------------------------------------------------
370        Bra
371        Brazero
372        CBra 1
373        \x{100}
374        CBra 2
375        b
376        Recurse
377        c
378        Ket
379        Ket
380        Ket
381        End
382------------------------------------------------------------------
383Capturing subpattern count = 2
384May match empty string
385Options: utf
386Subject length lower bound = 0
387
388/(\x{100}(b(?2)c)){0,2}/IB,utf
389------------------------------------------------------------------
390        Bra
391        Brazero
392        Bra
393        CBra 1
394        \x{100}
395        CBra 2
396        b
397        Recurse
398        c
399        Ket
400        Ket
401        Brazero
402        CBra 1
403        \x{100}
404        CBra 2
405        b
406        Recurse
407        c
408        Ket
409        Ket
410        Ket
411        Ket
412        End
413------------------------------------------------------------------
414Capturing subpattern count = 2
415May match empty string
416Options: utf
417Subject length lower bound = 0
418
419/(\x{100}(b(?1)c))?/IB,utf
420------------------------------------------------------------------
421        Bra
422        Brazero
423        CBra 1
424        \x{100}
425        CBra 2
426        b
427        Recurse
428        c
429        Ket
430        Ket
431        Ket
432        End
433------------------------------------------------------------------
434Capturing subpattern count = 2
435May match empty string
436Options: utf
437Subject length lower bound = 0
438
439/(\x{100}(b(?1)c)){0,2}/IB,utf
440------------------------------------------------------------------
441        Bra
442        Brazero
443        Bra
444        CBra 1
445        \x{100}
446        CBra 2
447        b
448        Recurse
449        c
450        Ket
451        Ket
452        Brazero
453        CBra 1
454        \x{100}
455        CBra 2
456        b
457        Recurse
458        c
459        Ket
460        Ket
461        Ket
462        Ket
463        End
464------------------------------------------------------------------
465Capturing subpattern count = 2
466May match empty string
467Options: utf
468Subject length lower bound = 0
469
470/\W/utf
471    A.B
472 0: .
473    A\x{100}B
474 0: \x{100}
475
476/\w/utf
477    \x{100}X
478 0: X
479
480/^\ሴ/IB,utf
481------------------------------------------------------------------
482        Bra
483        ^
484        \x{1234}
485        Ket
486        End
487------------------------------------------------------------------
488Capturing subpattern count = 0
489Compile options: utf
490Overall options: anchored utf
491Subject length lower bound = 1
492
493/()()()()()()()()()()
494 ()()()()()()()()()()
495 ()()()()()()()()()()
496 ()()()()()()()()()()
497 A (x) (?41) B/x,utf
498    AxxB
499Matched, but too many substrings
500 0: AxxB
501 1:
502 2:
503 3:
504 4:
505 5:
506 6:
507 7:
508 8:
509 9:
51010:
51111:
51212:
51313:
51414:
515
516/^[\x{100}\E-\Q\E\x{150}]/B,utf
517------------------------------------------------------------------
518        Bra
519        ^
520        [\x{100}-\x{150}]
521        Ket
522        End
523------------------------------------------------------------------
524
525/^[\QĀ\E-\QŐ\E]/B,utf
526------------------------------------------------------------------
527        Bra
528        ^
529        [\x{100}-\x{150}]
530        Ket
531        End
532------------------------------------------------------------------
533
534/^abc./gmx,newline=any,utf
535    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
536 0: abc1
537 0: abc2
538 0: abc3
539 0: abc4
540 0: abc5
541 0: abc6
542 0: abc7
543 0: abc8
544 0: abc9
545
546/abc.$/gmx,newline=any,utf
547    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
548 0: abc1
549 0: abc2
550 0: abc3
551 0: abc4
552 0: abc5
553 0: abc6
554 0: abc7
555 0: abc8
556 0: abc9
557
558/^a\Rb/bsr=unicode,utf
559    a\nb
560 0: a\x{0a}b
561    a\rb
562 0: a\x{0d}b
563    a\r\nb
564 0: a\x{0d}\x{0a}b
565    a\x0bb
566 0: a\x{0b}b
567    a\x0cb
568 0: a\x{0c}b
569    a\x{85}b
570 0: a\x{85}b
571    a\x{2028}b
572 0: a\x{2028}b
573    a\x{2029}b
574 0: a\x{2029}b
575\= Expect no match
576    a\n\rb
577No match
578
579/^a\R*b/bsr=unicode,utf
580    ab
581 0: ab
582    a\nb
583 0: a\x{0a}b
584    a\rb
585 0: a\x{0d}b
586    a\r\nb
587 0: a\x{0d}\x{0a}b
588    a\x0bb
589 0: a\x{0b}b
590    a\x0c\x{2028}\x{2029}b
591 0: a\x{0c}\x{2028}\x{2029}b
592    a\x{85}b
593 0: a\x{85}b
594    a\n\rb
595 0: a\x{0a}\x{0d}b
596    a\n\r\x{85}\x0cb
597 0: a\x{0a}\x{0d}\x{85}\x{0c}b
598
599/^a\R+b/bsr=unicode,utf
600    a\nb
601 0: a\x{0a}b
602    a\rb
603 0: a\x{0d}b
604    a\r\nb
605 0: a\x{0d}\x{0a}b
606    a\x0bb
607 0: a\x{0b}b
608    a\x0c\x{2028}\x{2029}b
609 0: a\x{0c}\x{2028}\x{2029}b
610    a\x{85}b
611 0: a\x{85}b
612    a\n\rb
613 0: a\x{0a}\x{0d}b
614    a\n\r\x{85}\x0cb
615 0: a\x{0a}\x{0d}\x{85}\x{0c}b
616\= Expect no match
617    ab
618No match
619
620/^a\R{1,3}b/bsr=unicode,utf
621    a\nb
622 0: a\x{0a}b
623    a\n\rb
624 0: a\x{0a}\x{0d}b
625    a\n\r\x{85}b
626 0: a\x{0a}\x{0d}\x{85}b
627    a\r\n\r\nb
628 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
629    a\r\n\r\n\r\nb
630 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
631    a\n\r\n\rb
632 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
633    a\n\n\r\nb
634 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
635\= Expect no match
636    a\n\n\n\rb
637No match
638    a\r
639No match
640
641/\H\h\V\v/utf
642    X X\x0a
643 0: X X\x{0a}
644    X\x09X\x0b
645 0: X\x{09}X\x{0b}
646\= Expect no match
647    \x{a0} X\x0a
648No match
649
650/\H*\h+\V?\v{3,4}/utf
651    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
652 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
653    \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
654 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
655    \x09\x20\x{a0}\x0a\x0b\x0c
656 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
657\= Expect no match
658    \x09\x20\x{a0}\x0a\x0b
659No match
660
661/\H\h\V\v/utf
662    \x{3001}\x{3000}\x{2030}\x{2028}
663 0: \x{3001}\x{3000}\x{2030}\x{2028}
664    X\x{180e}X\x{85}
665 0: X\x{180e}X\x{85}
666\= Expect no match
667    \x{2009} X\x0a
668No match
669
670/\H*\h+\V?\v{3,4}/utf
671    \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
672 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
673    \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
674 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
675    \x09\x20\x{202f}\x0a\x0b\x0c
676 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
677\= Expect no match
678    \x09\x{200a}\x{a0}\x{2028}\x0b
679No match
680
681/[\h]/B,utf
682------------------------------------------------------------------
683        Bra
684        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
685        Ket
686        End
687------------------------------------------------------------------
688    >\x{1680}
689 0: \x{1680}
690
691/[\h]{3,}/B,utf
692------------------------------------------------------------------
693        Bra
694        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}+
695        Ket
696        End
697------------------------------------------------------------------
698    >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
699 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
700
701/[\v]/B,utf
702------------------------------------------------------------------
703        Bra
704        [\x0a-\x0d\x85\x{2028}-\x{2029}]
705        Ket
706        End
707------------------------------------------------------------------
708
709/[\H]/B,utf
710------------------------------------------------------------------
711        Bra
712        [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}]
713        Ket
714        End
715------------------------------------------------------------------
716
717/[\V]/B,utf
718------------------------------------------------------------------
719        Bra
720        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}]
721        Ket
722        End
723------------------------------------------------------------------
724
725/.*$/newline=any,utf
726    \x{1ec5}
727 0: \x{1ec5}
728
729/a\Rb/I,bsr=anycrlf,utf
730Capturing subpattern count = 0
731Options: utf
732\R matches CR, LF, or CRLF
733First code unit = 'a'
734Last code unit = 'b'
735Subject length lower bound = 3
736    a\rb
737 0: a\x{0d}b
738    a\nb
739 0: a\x{0a}b
740    a\r\nb
741 0: a\x{0d}\x{0a}b
742\= Expect no match
743    a\x{85}b
744No match
745    a\x0bb
746No match
747
748/a\Rb/I,bsr=unicode,utf
749Capturing subpattern count = 0
750Options: utf
751\R matches any Unicode newline
752First code unit = 'a'
753Last code unit = 'b'
754Subject length lower bound = 3
755    a\rb
756 0: a\x{0d}b
757    a\nb
758 0: a\x{0a}b
759    a\r\nb
760 0: a\x{0d}\x{0a}b
761    a\x{85}b
762 0: a\x{85}b
763    a\x0bb
764 0: a\x{0b}b
765
766/a\R?b/I,bsr=anycrlf,utf
767Capturing subpattern count = 0
768Options: utf
769\R matches CR, LF, or CRLF
770First code unit = 'a'
771Last code unit = 'b'
772Subject length lower bound = 2
773    a\rb
774 0: a\x{0d}b
775    a\nb
776 0: a\x{0a}b
777    a\r\nb
778 0: a\x{0d}\x{0a}b
779\= Expect no match
780    a\x{85}b
781No match
782    a\x0bb
783No match
784
785/a\R?b/I,bsr=unicode,utf
786Capturing subpattern count = 0
787Options: utf
788\R matches any Unicode newline
789First code unit = 'a'
790Last code unit = 'b'
791Subject length lower bound = 2
792    a\rb
793 0: a\x{0d}b
794    a\nb
795 0: a\x{0a}b
796    a\r\nb
797 0: a\x{0d}\x{0a}b
798    a\x{85}b
799 0: a\x{85}b
800    a\x0bb
801 0: a\x{0b}b
802
803/.*a.*=.b.*/utf,newline=any
804    QQQ\x{2029}ABCaXYZ=!bPQR
805 0: ABCaXYZ=!bPQR
806\= Expect no match
807    a\x{2029}b
808No match
809    \x61\xe2\x80\xa9\x62
810No match
811
812/[[:a\x{100}b:]]/utf
813Failed: error 130 at offset 3: unknown POSIX class name
814
815/a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref
816    a\x{1234}b
817 0: a\x{1234}b
818    a\nb
819 0: a\x{0a}b
820\= Expect no match
821    ab
822No match
823
824/a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref
825    aXb
826 0: aXb
827    a\nX\nX\x{1234}b
828 0: a\x{0a}X\x{0a}X\x{1234}b
829\= Expect no match
830    ab
831No match
832
833/(\x{de})\1/
834    \x{de}\x{de}
835 0: \xde\xde
836 1: \xde
837
838/X/newline=any,utf,firstline
839    A\x{1ec5}ABCXYZ
840 0: X
841
842/Xa{2,4}b/utf
843    X\=ps
844Partial match: X
845    Xa\=ps
846Partial match: Xa
847    Xaa\=ps
848Partial match: Xaa
849    Xaaa\=ps
850Partial match: Xaaa
851    Xaaaa\=ps
852Partial match: Xaaaa
853
854/Xa{2,4}?b/utf
855    X\=ps
856Partial match: X
857    Xa\=ps
858Partial match: Xa
859    Xaa\=ps
860Partial match: Xaa
861    Xaaa\=ps
862Partial match: Xaaa
863    Xaaaa\=ps
864Partial match: Xaaaa
865
866/Xa{2,4}+b/utf
867    X\=ps
868Partial match: X
869    Xa\=ps
870Partial match: Xa
871    Xaa\=ps
872Partial match: Xaa
873    Xaaa\=ps
874Partial match: Xaaa
875    Xaaaa\=ps
876Partial match: Xaaaa
877
878/X\x{123}{2,4}b/utf
879    X\=ps
880Partial match: X
881    X\x{123}\=ps
882Partial match: X\x{123}
883    X\x{123}\x{123}\=ps
884Partial match: X\x{123}\x{123}
885    X\x{123}\x{123}\x{123}\=ps
886Partial match: X\x{123}\x{123}\x{123}
887    X\x{123}\x{123}\x{123}\x{123}\=ps
888Partial match: X\x{123}\x{123}\x{123}\x{123}
889
890/X\x{123}{2,4}?b/utf
891    X\=ps
892Partial match: X
893    X\x{123}\=ps
894Partial match: X\x{123}
895    X\x{123}\x{123}\=ps
896Partial match: X\x{123}\x{123}
897    X\x{123}\x{123}\x{123}\=ps
898Partial match: X\x{123}\x{123}\x{123}
899    X\x{123}\x{123}\x{123}\x{123}\=ps
900Partial match: X\x{123}\x{123}\x{123}\x{123}
901
902/X\x{123}{2,4}+b/utf
903    X\=ps
904Partial match: X
905    X\x{123}\=ps
906Partial match: X\x{123}
907    X\x{123}\x{123}\=ps
908Partial match: X\x{123}\x{123}
909    X\x{123}\x{123}\x{123}\=ps
910Partial match: X\x{123}\x{123}\x{123}
911    X\x{123}\x{123}\x{123}\x{123}\=ps
912Partial match: X\x{123}\x{123}\x{123}\x{123}
913
914/X\x{123}{2,4}b/utf
915\= Expect no match
916    Xx\=ps
917No match
918    X\x{123}x\=ps
919No match
920    X\x{123}\x{123}x\=ps
921No match
922    X\x{123}\x{123}\x{123}x\=ps
923No match
924    X\x{123}\x{123}\x{123}\x{123}x\=ps
925No match
926
927/X\x{123}{2,4}?b/utf
928\= Expect no match
929    Xx\=ps
930No match
931    X\x{123}x\=ps
932No match
933    X\x{123}\x{123}x\=ps
934No match
935    X\x{123}\x{123}\x{123}x\=ps
936No match
937    X\x{123}\x{123}\x{123}\x{123}x\=ps
938No match
939
940/X\x{123}{2,4}+b/utf
941\= Expect no match
942    Xx\=ps
943No match
944    X\x{123}x\=ps
945No match
946    X\x{123}\x{123}x\=ps
947No match
948    X\x{123}\x{123}\x{123}x\=ps
949No match
950    X\x{123}\x{123}\x{123}\x{123}x\=ps
951No match
952
953/X\d{2,4}b/utf
954    X\=ps
955Partial match: X
956    X3\=ps
957Partial match: X3
958    X33\=ps
959Partial match: X33
960    X333\=ps
961Partial match: X333
962    X3333\=ps
963Partial match: X3333
964
965/X\d{2,4}?b/utf
966    X\=ps
967Partial match: X
968    X3\=ps
969Partial match: X3
970    X33\=ps
971Partial match: X33
972    X333\=ps
973Partial match: X333
974    X3333\=ps
975Partial match: X3333
976
977/X\d{2,4}+b/utf
978    X\=ps
979Partial match: X
980    X3\=ps
981Partial match: X3
982    X33\=ps
983Partial match: X33
984    X333\=ps
985Partial match: X333
986    X3333\=ps
987Partial match: X3333
988
989/X\D{2,4}b/utf
990    X\=ps
991Partial match: X
992    Xa\=ps
993Partial match: Xa
994    Xaa\=ps
995Partial match: Xaa
996    Xaaa\=ps
997Partial match: Xaaa
998    Xaaaa\=ps
999Partial match: Xaaaa
1000
1001/X\D{2,4}?b/utf
1002    X\=ps
1003Partial match: X
1004    Xa\=ps
1005Partial match: Xa
1006    Xaa\=ps
1007Partial match: Xaa
1008    Xaaa\=ps
1009Partial match: Xaaa
1010    Xaaaa\=ps
1011Partial match: Xaaaa
1012
1013/X\D{2,4}+b/utf
1014    X\=ps
1015Partial match: X
1016    Xa\=ps
1017Partial match: Xa
1018    Xaa\=ps
1019Partial match: Xaa
1020    Xaaa\=ps
1021Partial match: Xaaa
1022    Xaaaa\=ps
1023Partial match: Xaaaa
1024
1025/X\D{2,4}b/utf
1026    X\=ps
1027Partial match: X
1028    X\x{123}\=ps
1029Partial match: X\x{123}
1030    X\x{123}\x{123}\=ps
1031Partial match: X\x{123}\x{123}
1032    X\x{123}\x{123}\x{123}\=ps
1033Partial match: X\x{123}\x{123}\x{123}
1034    X\x{123}\x{123}\x{123}\x{123}\=ps
1035Partial match: X\x{123}\x{123}\x{123}\x{123}
1036
1037/X\D{2,4}?b/utf
1038    X\=ps
1039Partial match: X
1040    X\x{123}\=ps
1041Partial match: X\x{123}
1042    X\x{123}\x{123}\=ps
1043Partial match: X\x{123}\x{123}
1044    X\x{123}\x{123}\x{123}\=ps
1045Partial match: X\x{123}\x{123}\x{123}
1046    X\x{123}\x{123}\x{123}\x{123}\=ps
1047Partial match: X\x{123}\x{123}\x{123}\x{123}
1048
1049/X\D{2,4}+b/utf
1050    X\=ps
1051Partial match: X
1052    X\x{123}\=ps
1053Partial match: X\x{123}
1054    X\x{123}\x{123}\=ps
1055Partial match: X\x{123}\x{123}
1056    X\x{123}\x{123}\x{123}\=ps
1057Partial match: X\x{123}\x{123}\x{123}
1058    X\x{123}\x{123}\x{123}\x{123}\=ps
1059Partial match: X\x{123}\x{123}\x{123}\x{123}
1060
1061/X[abc]{2,4}b/utf
1062    X\=ps
1063Partial match: X
1064    Xa\=ps
1065Partial match: Xa
1066    Xaa\=ps
1067Partial match: Xaa
1068    Xaaa\=ps
1069Partial match: Xaaa
1070    Xaaaa\=ps
1071Partial match: Xaaaa
1072
1073/X[abc]{2,4}?b/utf
1074    X\=ps
1075Partial match: X
1076    Xa\=ps
1077Partial match: Xa
1078    Xaa\=ps
1079Partial match: Xaa
1080    Xaaa\=ps
1081Partial match: Xaaa
1082    Xaaaa\=ps
1083Partial match: Xaaaa
1084
1085/X[abc]{2,4}+b/utf
1086    X\=ps
1087Partial match: X
1088    Xa\=ps
1089Partial match: Xa
1090    Xaa\=ps
1091Partial match: Xaa
1092    Xaaa\=ps
1093Partial match: Xaaa
1094    Xaaaa\=ps
1095Partial match: Xaaaa
1096
1097/X[abc\x{123}]{2,4}b/utf
1098    X\=ps
1099Partial match: X
1100    X\x{123}\=ps
1101Partial match: X\x{123}
1102    X\x{123}\x{123}\=ps
1103Partial match: X\x{123}\x{123}
1104    X\x{123}\x{123}\x{123}\=ps
1105Partial match: X\x{123}\x{123}\x{123}
1106    X\x{123}\x{123}\x{123}\x{123}\=ps
1107Partial match: X\x{123}\x{123}\x{123}\x{123}
1108
1109/X[abc\x{123}]{2,4}?b/utf
1110    X\=ps
1111Partial match: X
1112    X\x{123}\=ps
1113Partial match: X\x{123}
1114    X\x{123}\x{123}\=ps
1115Partial match: X\x{123}\x{123}
1116    X\x{123}\x{123}\x{123}\=ps
1117Partial match: X\x{123}\x{123}\x{123}
1118    X\x{123}\x{123}\x{123}\x{123}\=ps
1119Partial match: X\x{123}\x{123}\x{123}\x{123}
1120
1121/X[abc\x{123}]{2,4}+b/utf
1122    X\=ps
1123Partial match: X
1124    X\x{123}\=ps
1125Partial match: X\x{123}
1126    X\x{123}\x{123}\=ps
1127Partial match: X\x{123}\x{123}
1128    X\x{123}\x{123}\x{123}\=ps
1129Partial match: X\x{123}\x{123}\x{123}
1130    X\x{123}\x{123}\x{123}\x{123}\=ps
1131Partial match: X\x{123}\x{123}\x{123}\x{123}
1132
1133/X[^a]{2,4}b/utf
1134    X\=ps
1135Partial match: X
1136    Xz\=ps
1137Partial match: Xz
1138    Xzz\=ps
1139Partial match: Xzz
1140    Xzzz\=ps
1141Partial match: Xzzz
1142    Xzzzz\=ps
1143Partial match: Xzzzz
1144
1145/X[^a]{2,4}?b/utf
1146    X\=ps
1147Partial match: X
1148    Xz\=ps
1149Partial match: Xz
1150    Xzz\=ps
1151Partial match: Xzz
1152    Xzzz\=ps
1153Partial match: Xzzz
1154    Xzzzz\=ps
1155Partial match: Xzzzz
1156
1157/X[^a]{2,4}+b/utf
1158    X\=ps
1159Partial match: X
1160    Xz\=ps
1161Partial match: Xz
1162    Xzz\=ps
1163Partial match: Xzz
1164    Xzzz\=ps
1165Partial match: Xzzz
1166    Xzzzz\=ps
1167Partial match: Xzzzz
1168
1169/X[^a]{2,4}b/utf
1170    X\=ps
1171Partial match: X
1172    X\x{123}\=ps
1173Partial match: X\x{123}
1174    X\x{123}\x{123}\=ps
1175Partial match: X\x{123}\x{123}
1176    X\x{123}\x{123}\x{123}\=ps
1177Partial match: X\x{123}\x{123}\x{123}
1178    X\x{123}\x{123}\x{123}\x{123}\=ps
1179Partial match: X\x{123}\x{123}\x{123}\x{123}
1180
1181/X[^a]{2,4}?b/utf
1182    X\=ps
1183Partial match: X
1184    X\x{123}\=ps
1185Partial match: X\x{123}
1186    X\x{123}\x{123}\=ps
1187Partial match: X\x{123}\x{123}
1188    X\x{123}\x{123}\x{123}\=ps
1189Partial match: X\x{123}\x{123}\x{123}
1190    X\x{123}\x{123}\x{123}\x{123}\=ps
1191Partial match: X\x{123}\x{123}\x{123}\x{123}
1192
1193/X[^a]{2,4}+b/utf
1194    X\=ps
1195Partial match: X
1196    X\x{123}\=ps
1197Partial match: X\x{123}
1198    X\x{123}\x{123}\=ps
1199Partial match: X\x{123}\x{123}
1200    X\x{123}\x{123}\x{123}\=ps
1201Partial match: X\x{123}\x{123}\x{123}
1202    X\x{123}\x{123}\x{123}\x{123}\=ps
1203Partial match: X\x{123}\x{123}\x{123}\x{123}
1204
1205/(Y)X\1{2,4}b/utf
1206    YX\=ps
1207Partial match: YX
1208    YXY\=ps
1209Partial match: YXY
1210    YXYY\=ps
1211Partial match: YXYY
1212    YXYYY\=ps
1213Partial match: YXYYY
1214    YXYYYY\=ps
1215Partial match: YXYYYY
1216
1217/(Y)X\1{2,4}?b/utf
1218    YX\=ps
1219Partial match: YX
1220    YXY\=ps
1221Partial match: YXY
1222    YXYY\=ps
1223Partial match: YXYY
1224    YXYYY\=ps
1225Partial match: YXYYY
1226    YXYYYY\=ps
1227Partial match: YXYYYY
1228
1229/(Y)X\1{2,4}+b/utf
1230    YX\=ps
1231Partial match: YX
1232    YXY\=ps
1233Partial match: YXY
1234    YXYY\=ps
1235Partial match: YXYY
1236    YXYYY\=ps
1237Partial match: YXYYY
1238    YXYYYY\=ps
1239Partial match: YXYYYY
1240
1241/(\x{123})X\1{2,4}b/utf
1242    \x{123}X\=ps
1243Partial match: \x{123}X
1244    \x{123}X\x{123}\=ps
1245Partial match: \x{123}X\x{123}
1246    \x{123}X\x{123}\x{123}\=ps
1247Partial match: \x{123}X\x{123}\x{123}
1248    \x{123}X\x{123}\x{123}\x{123}\=ps
1249Partial match: \x{123}X\x{123}\x{123}\x{123}
1250    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1251Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1252
1253/(\x{123})X\1{2,4}?b/utf
1254    \x{123}X\=ps
1255Partial match: \x{123}X
1256    \x{123}X\x{123}\=ps
1257Partial match: \x{123}X\x{123}
1258    \x{123}X\x{123}\x{123}\=ps
1259Partial match: \x{123}X\x{123}\x{123}
1260    \x{123}X\x{123}\x{123}\x{123}\=ps
1261Partial match: \x{123}X\x{123}\x{123}\x{123}
1262    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1263Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1264
1265/(\x{123})X\1{2,4}+b/utf
1266    \x{123}X\=ps
1267Partial match: \x{123}X
1268    \x{123}X\x{123}\=ps
1269Partial match: \x{123}X\x{123}
1270    \x{123}X\x{123}\x{123}\=ps
1271Partial match: \x{123}X\x{123}\x{123}
1272    \x{123}X\x{123}\x{123}\x{123}\=ps
1273Partial match: \x{123}X\x{123}\x{123}\x{123}
1274    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1275Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1276
1277/\bthe cat\b/utf
1278    the cat\=ps
1279 0: the cat
1280    the cat\=ph
1281Partial match: the cat
1282
1283/abcd*/utf
1284    xxxxabcd\=ps
1285 0: abcd
1286    xxxxabcd\=ph
1287Partial match: abcd
1288
1289/abcd*/i,utf
1290    xxxxabcd\=ps
1291 0: abcd
1292    xxxxabcd\=ph
1293Partial match: abcd
1294    XXXXABCD\=ps
1295 0: ABCD
1296    XXXXABCD\=ph
1297Partial match: ABCD
1298
1299/abc\d*/utf
1300    xxxxabc1\=ps
1301 0: abc1
1302    xxxxabc1\=ph
1303Partial match: abc1
1304
1305/(a)bc\1*/utf
1306    xxxxabca\=ps
1307 0: abca
1308 1: a
1309    xxxxabca\=ph
1310Partial match: abca
1311
1312/abc[de]*/utf
1313    xxxxabcde\=ps
1314 0: abcde
1315    xxxxabcde\=ph
1316Partial match: abcde
1317
1318/X\W{3}X/utf
1319    X\=ps
1320Partial match: X
1321
1322/\sxxx\s/utf,tables=2
1323    AB\x{85}xxx\x{a0}XYZ
1324 0: \x{85}xxx\x{a0}
1325    AB\x{a0}xxx\x{85}XYZ
1326 0: \x{a0}xxx\x{85}
1327
1328/\S \S/utf,tables=2
1329    \x{a2} \x{84}
1330 0: \x{a2} \x{84}
1331
1332'A#хц'Bx,newline=any,utf
1333------------------------------------------------------------------
1334        Bra
1335        A
1336        Ket
1337        End
1338------------------------------------------------------------------
1339
1340'A#хц
1341  PQ'Bx,newline=any,utf
1342------------------------------------------------------------------
1343        Bra
1344        APQ
1345        Ket
1346        End
1347------------------------------------------------------------------
1348
1349/a+#хaa
1350  z#XX?/Bx,newline=any,utf
1351------------------------------------------------------------------
1352        Bra
1353        a++
1354        z
1355        Ket
1356        End
1357------------------------------------------------------------------
1358
1359/a+#хaa
1360  z#х?/Bx,newline=any,utf
1361------------------------------------------------------------------
1362        Bra
1363        a++
1364        z
1365        Ket
1366        End
1367------------------------------------------------------------------
1368
1369/\g{A}xxx#bXX(?'A'123)
1370(?'A'456)/Bx,newline=any,utf
1371------------------------------------------------------------------
1372        Bra
1373        \1
1374        xxx
1375        CBra 1
1376        456
1377        Ket
1378        Ket
1379        End
1380------------------------------------------------------------------
1381
1382/\g{A}xxx#bх(?'A'123)
1383(?'A'456)/Bx,newline=any,utf
1384------------------------------------------------------------------
1385        Bra
1386        \1
1387        xxx
1388        CBra 1
1389        456
1390        Ket
1391        Ket
1392        End
1393------------------------------------------------------------------
1394
1395/^\cģ/utf
1396Failed: error 168 at offset 3: \c must be followed by a printable ASCII character
1397
1398/(\R*)(.)/s,utf
1399    \r\n
1400 0: \x{0d}
1401 1:
1402 2: \x{0d}
1403    \r\r\n\n\r
1404 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1405 1: \x{0d}\x{0d}\x{0a}\x{0a}
1406 2: \x{0d}
1407    \r\r\n\n\r\n
1408 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1409 1: \x{0d}\x{0d}\x{0a}\x{0a}
1410 2: \x{0d}
1411
1412/(\R)*(.)/s,utf
1413    \r\n
1414 0: \x{0d}
1415 1: <unset>
1416 2: \x{0d}
1417    \r\r\n\n\r
1418 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1419 1: \x{0a}
1420 2: \x{0d}
1421    \r\r\n\n\r\n
1422 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1423 1: \x{0a}
1424 2: \x{0d}
1425
1426/[^\x{1234}]+/Ii,utf
1427Capturing subpattern count = 0
1428Options: caseless utf
1429Subject length lower bound = 1
1430
1431/[^\x{1234}]+?/Ii,utf
1432Capturing subpattern count = 0
1433Options: caseless utf
1434Subject length lower bound = 1
1435
1436/[^\x{1234}]++/Ii,utf
1437Capturing subpattern count = 0
1438Options: caseless utf
1439Subject length lower bound = 1
1440
1441/[^\x{1234}]{2}/Ii,utf
1442Capturing subpattern count = 0
1443Options: caseless utf
1444Subject length lower bound = 2
1445
1446/f.*/
1447    for\=ph
1448Partial match: for
1449
1450/f.*/s
1451    for\=ph
1452Partial match: for
1453
1454/f.*/utf
1455    for\=ph
1456Partial match: for
1457
1458/f.*/s,utf
1459    for\=ph
1460Partial match: for
1461
1462/\x{d7ff}\x{e000}/utf
1463
1464/\x{d800}/utf
1465Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1466
1467/\x{dfff}/utf
1468Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1469
1470/\h+/utf
1471    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1472 0: \x{1680}\x{2000}\x{202f}\x{3000}
1473    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1474 0: \x{200a}\x{a0}\x{2000}
1475
1476/[\h\x{e000}]+/B,utf
1477------------------------------------------------------------------
1478        Bra
1479        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]++
1480        Ket
1481        End
1482------------------------------------------------------------------
1483    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1484 0: \x{1680}\x{2000}\x{202f}\x{3000}
1485    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1486 0: \x{200a}\x{a0}\x{2000}
1487
1488/\H+/utf
1489    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1490 0: \x{167f}\x{1681}\x{180d}\x{180f}
1491    \x{2000}\x{200a}\x{1fff}\x{200b}
1492 0: \x{1fff}\x{200b}
1493    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1494 0: \x{202e}\x{2030}\x{205e}\x{2060}
1495    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1496 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1497
1498/[\H\x{d7ff}]+/B,utf
1499------------------------------------------------------------------
1500        Bra
1501        [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]++
1502        Ket
1503        End
1504------------------------------------------------------------------
1505    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1506 0: \x{167f}\x{1681}\x{180d}\x{180f}
1507    \x{2000}\x{200a}\x{1fff}\x{200b}
1508 0: \x{1fff}\x{200b}
1509    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1510 0: \x{202e}\x{2030}\x{205e}\x{2060}
1511    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1512 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1513
1514/\v+/utf
1515    \x{2027}\x{2030}\x{2028}\x{2029}
1516 0: \x{2028}\x{2029}
1517    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1518 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1519
1520/[\v\x{e000}]+/B,utf
1521------------------------------------------------------------------
1522        Bra
1523        [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]++
1524        Ket
1525        End
1526------------------------------------------------------------------
1527    \x{2027}\x{2030}\x{2028}\x{2029}
1528 0: \x{2028}\x{2029}
1529    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1530 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1531
1532/\V+/utf
1533    \x{2028}\x{2029}\x{2027}\x{2030}
1534 0: \x{2027}\x{2030}
1535    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1536 0: \x{09}\x{0e}\x{84}\x{86}
1537
1538/[\V\x{d7ff}]+/B,utf
1539------------------------------------------------------------------
1540        Bra
1541        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]++
1542        Ket
1543        End
1544------------------------------------------------------------------
1545    \x{2028}\x{2029}\x{2027}\x{2030}
1546 0: \x{2027}\x{2030}
1547    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1548 0: \x{09}\x{0e}\x{84}\x{86}
1549
1550/\R+/bsr=unicode,utf
1551    \x{2027}\x{2030}\x{2028}\x{2029}
1552 0: \x{2028}\x{2029}
1553    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1554 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1555
1556/(..)\1/utf
1557    ab\=ps
1558Partial match: ab
1559    aba\=ps
1560Partial match: aba
1561    abab\=ps
1562 0: abab
1563 1: ab
1564
1565/(..)\1/i,utf
1566    ab\=ps
1567Partial match: ab
1568    abA\=ps
1569Partial match: abA
1570    aBAb\=ps
1571 0: aBAb
1572 1: aB
1573
1574/(..)\1{2,}/utf
1575    ab\=ps
1576Partial match: ab
1577    aba\=ps
1578Partial match: aba
1579    abab\=ps
1580Partial match: abab
1581    ababa\=ps
1582Partial match: ababa
1583    ababab\=ps
1584 0: ababab
1585 1: ab
1586    ababab\=ph
1587Partial match: ababab
1588    abababa\=ps
1589 0: ababab
1590 1: ab
1591    abababa\=ph
1592Partial match: abababa
1593
1594/(..)\1{2,}/i,utf
1595    ab\=ps
1596Partial match: ab
1597    aBa\=ps
1598Partial match: aBa
1599    aBAb\=ps
1600Partial match: aBAb
1601    AbaBA\=ps
1602Partial match: AbaBA
1603    abABAb\=ps
1604 0: abABAb
1605 1: ab
1606    aBAbaB\=ph
1607Partial match: aBAbaB
1608    abABabA\=ps
1609 0: abABab
1610 1: ab
1611    abaBABa\=ph
1612Partial match: abaBABa
1613
1614/(..)\1{2,}?x/i,utf
1615    ab\=ps
1616Partial match: ab
1617    abA\=ps
1618Partial match: abA
1619    aBAb\=ps
1620Partial match: aBAb
1621    abaBA\=ps
1622Partial match: abaBA
1623    abAbaB\=ps
1624Partial match: abAbaB
1625    abaBabA\=ps
1626Partial match: abaBabA
1627    abAbABaBx\=ps
1628 0: abAbABaBx
1629 1: ab
1630
1631/./utf,newline=crlf
1632    \r\=ps
1633 0: \x{0d}
1634    \r\=ph
1635Partial match: \x{0d}
1636
1637/.{2,3}/utf,newline=crlf
1638    \r\=ps
1639Partial match: \x{0d}
1640    \r\=ph
1641Partial match: \x{0d}
1642    \r\r\=ps
1643 0: \x{0d}\x{0d}
1644    \r\r\=ph
1645Partial match: \x{0d}\x{0d}
1646    \r\r\r\=ps
1647 0: \x{0d}\x{0d}\x{0d}
1648    \r\r\r\=ph
1649Partial match: \x{0d}\x{0d}\x{0d}
1650
1651/.{2,3}?/utf,newline=crlf
1652    \r\=ps
1653Partial match: \x{0d}
1654    \r\=ph
1655Partial match: \x{0d}
1656    \r\r\=ps
1657 0: \x{0d}\x{0d}
1658    \r\r\=ph
1659Partial match: \x{0d}\x{0d}
1660    \r\r\r\=ps
1661 0: \x{0d}\x{0d}
1662    \r\r\r\=ph
1663 0: \x{0d}\x{0d}
1664
1665/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/B,utf
1666------------------------------------------------------------------
1667        Bra
1668        [^\x{100}]
1669        [^\x{1234}]
1670        [^\x{ffff}]
1671        [^\x{10000}]
1672        [^\x{10ffff}]
1673        Ket
1674        End
1675------------------------------------------------------------------
1676
1677/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/Bi,utf
1678------------------------------------------------------------------
1679        Bra
1680     /i [^\x{100}]
1681     /i [^\x{1234}]
1682     /i [^\x{ffff}]
1683     /i [^\x{10000}]
1684     /i [^\x{10ffff}]
1685        Ket
1686        End
1687------------------------------------------------------------------
1688
1689/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/B,utf
1690------------------------------------------------------------------
1691        Bra
1692        [^\x{100}]*
1693        [^\x{10000}]+
1694        [^\x{10ffff}]??
1695        [^\x{8000}]{4}
1696        [^\x{8000}]*
1697        [^\x{7fff}]{2}
1698        [^\x{7fff}]{0,7}?
1699        [^\x{fffff}]{5}
1700        [^\x{fffff}]?+
1701        Ket
1702        End
1703------------------------------------------------------------------
1704
1705/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/Bi,utf
1706------------------------------------------------------------------
1707        Bra
1708     /i [^\x{100}]*
1709     /i [^\x{10000}]+
1710     /i [^\x{10ffff}]??
1711     /i [^\x{8000}]{4}
1712     /i [^\x{8000}]*
1713     /i [^\x{7fff}]{2}
1714     /i [^\x{7fff}]{0,7}?
1715     /i [^\x{fffff}]{5}
1716     /i [^\x{fffff}]?+
1717        Ket
1718        End
1719------------------------------------------------------------------
1720
1721/(?<=\x{1234}\x{1234})\bxy/I,utf
1722Capturing subpattern count = 0
1723Max lookbehind = 2
1724Options: utf
1725First code unit = 'x'
1726Last code unit = 'y'
1727Subject length lower bound = 2
1728
1729/(?<!^)ETA/utf
1730\= Expect no match
1731    ETA
1732No match
1733
1734/\u0100/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1735------------------------------------------------------------------
1736        Bra
1737        \x{100}
1738        Ket
1739        End
1740------------------------------------------------------------------
1741
1742/[\u0100-\u0200]/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1743------------------------------------------------------------------
1744        Bra
1745        [\x{100}-\x{200}]
1746        Ket
1747        End
1748------------------------------------------------------------------
1749
1750/\ud800/utf,alt_bsux,allow_empty_class,match_unset_backref
1751Failed: error 173 at offset 5: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1752
1753/^a+[a\x{200}]/B,utf
1754------------------------------------------------------------------
1755        Bra
1756        ^
1757        a+
1758        [a\x{200}]
1759        Ket
1760        End
1761------------------------------------------------------------------
1762    aa
1763 0: aa
1764
1765/[b-d\x{200}-\x{250}]*[ae-h]?#[\x{200}-\x{250}]{0,8}[\x00-\xff]*#[\x{200}-\x{250}]+[a-z]/B,utf
1766------------------------------------------------------------------
1767        Bra
1768        [b-d\x{200}-\x{250}]*+
1769        [ae-h]?+
1770        #
1771        [\x{200}-\x{250}]{0,8}+
1772        [\x00-\xff]*
1773        #
1774        [\x{200}-\x{250}]++
1775        [a-z]
1776        Ket
1777        End
1778------------------------------------------------------------------
1779
1780/[\p{L}]/IB
1781------------------------------------------------------------------
1782        Bra
1783        [\p{L}]
1784        Ket
1785        End
1786------------------------------------------------------------------
1787Capturing subpattern count = 0
1788Subject length lower bound = 1
1789
1790/[\p{^L}]/IB
1791------------------------------------------------------------------
1792        Bra
1793        [\P{L}]
1794        Ket
1795        End
1796------------------------------------------------------------------
1797Capturing subpattern count = 0
1798Subject length lower bound = 1
1799
1800/[\P{L}]/IB
1801------------------------------------------------------------------
1802        Bra
1803        [\P{L}]
1804        Ket
1805        End
1806------------------------------------------------------------------
1807Capturing subpattern count = 0
1808Subject length lower bound = 1
1809
1810/[\P{^L}]/IB
1811------------------------------------------------------------------
1812        Bra
1813        [\p{L}]
1814        Ket
1815        End
1816------------------------------------------------------------------
1817Capturing subpattern count = 0
1818Subject length lower bound = 1
1819
1820/[abc\p{L}\x{0660}]/IB,utf
1821------------------------------------------------------------------
1822        Bra
1823        [a-c\p{L}\x{660}]
1824        Ket
1825        End
1826------------------------------------------------------------------
1827Capturing subpattern count = 0
1828Options: utf
1829Subject length lower bound = 1
1830
1831/[\p{Nd}]/IB,utf
1832------------------------------------------------------------------
1833        Bra
1834        [\p{Nd}]
1835        Ket
1836        End
1837------------------------------------------------------------------
1838Capturing subpattern count = 0
1839Options: utf
1840Subject length lower bound = 1
1841    1234
1842 0: 1
1843
1844/[\p{Nd}+-]+/IB,utf
1845------------------------------------------------------------------
1846        Bra
1847        [+\-\p{Nd}]++
1848        Ket
1849        End
1850------------------------------------------------------------------
1851Capturing subpattern count = 0
1852Options: utf
1853Subject length lower bound = 1
1854    1234
1855 0: 1234
1856    12-34
1857 0: 12-34
1858    12+\x{661}-34
1859 0: 12+\x{661}-34
1860\= Expect no match
1861    abcd
1862No match
1863
1864/(?:[\PPa*]*){8,}/
1865
1866/[\P{Any}]/B
1867------------------------------------------------------------------
1868        Bra
1869        [\P{Any}]
1870        Ket
1871        End
1872------------------------------------------------------------------
1873
1874/[\P{Any}\E]/B
1875------------------------------------------------------------------
1876        Bra
1877        [\P{Any}]
1878        Ket
1879        End
1880------------------------------------------------------------------
1881
1882/(\P{Yi}+\277)/
1883
1884/(\P{Yi}+\277)?/
1885
1886/(?<=\P{Yi}{3}A)X/
1887
1888/\p{Yi}+(\P{Yi}+)(?1)/
1889
1890/(\P{Yi}{2}\277)?/
1891
1892/[\P{Yi}A]/
1893
1894/[\P{Yi}\P{Yi}\P{Yi}A]/
1895
1896/[^\P{Yi}A]/
1897
1898/[^\P{Yi}\P{Yi}\P{Yi}A]/
1899
1900/(\P{Yi}*\277)*/
1901
1902/(\P{Yi}*?\277)*/
1903
1904/(\p{Yi}*+\277)*/
1905
1906/(\P{Yi}?\277)*/
1907
1908/(\P{Yi}??\277)*/
1909
1910/(\p{Yi}?+\277)*/
1911
1912/(\P{Yi}{0,3}\277)*/
1913
1914/(\P{Yi}{0,3}?\277)*/
1915
1916/(\p{Yi}{0,3}+\277)*/
1917
1918/\p{Zl}{2,3}+/B,utf
1919------------------------------------------------------------------
1920        Bra
1921        prop Zl {2}
1922        prop Zl ?+
1923        Ket
1924        End
1925------------------------------------------------------------------
1926    


1927 0: \x{2028}\x{2028}
1928    \x{2028}\x{2028}\x{2028}
1929 0: \x{2028}\x{2028}\x{2028}
1930
1931/\p{Zl}/B,utf
1932------------------------------------------------------------------
1933        Bra
1934        prop Zl
1935        Ket
1936        End
1937------------------------------------------------------------------
1938
1939/\p{Lu}{3}+/B,utf
1940------------------------------------------------------------------
1941        Bra
1942        prop Lu {3}
1943        Ket
1944        End
1945------------------------------------------------------------------
1946
1947/\pL{2}+/B,utf
1948------------------------------------------------------------------
1949        Bra
1950        prop L {2}
1951        Ket
1952        End
1953------------------------------------------------------------------
1954
1955/\p{Cc}{2}+/B,utf
1956------------------------------------------------------------------
1957        Bra
1958        prop Cc {2}
1959        Ket
1960        End
1961------------------------------------------------------------------
1962
1963/^\p{Cf}/utf
1964    \x{180e}
1965 0: \x{180e}
1966    \x{061c}
1967 0: \x{61c}
1968    \x{2066}
1969 0: \x{2066}
1970    \x{2067}
1971 0: \x{2067}
1972    \x{2068}
1973 0: \x{2068}
1974    \x{2069}
1975 0: \x{2069}
1976
1977/^\p{Cs}/utf
1978    \x{dfff}\=no_utf_check
1979 0: \x{dfff}
1980\= Expect no match
1981    \x{09f}
1982No match
1983
1984/^\p{Mn}/utf
1985    \x{1a1b}
1986 0: \x{1a1b}
1987
1988/^\p{Pe}/utf
1989    \x{2309}
1990 0: \x{2309}
1991    \x{230b}
1992 0: \x{230b}
1993
1994/^\p{Ps}/utf
1995    \x{2308}
1996 0: \x{2308}
1997    \x{230a}
1998 0: \x{230a}
1999
2000/^\p{Sc}+/utf
2001    $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
2002 0: $\x{a2}\x{a3}\x{a4}\x{a5}
2003    \x{9f2}
2004 0: \x{9f2}
2005\= Expect no match
2006    X
2007No match
2008    \x{2c2}
2009No match
2010
2011/^\p{Zs}/utf
2012    \ \
2013 0:
2014    \x{a0}
2015 0: \x{a0}
2016    \x{1680}
2017 0: \x{1680}
2018    \x{2000}
2019 0: \x{2000}
2020    \x{2001}
2021 0: \x{2001}
2022\= Expect no match
2023    \x{2028}
2024No match
2025    \x{200d}
2026No match
2027
2028# These are here because Perl has problems with the negative versions of the
2029# properties and has changed how it behaves for caseless matching.
2030
2031/\p{^Lu}/i,utf
2032    1234
2033 0: 1
2034\= Expect no match
2035    ABC
2036No match
2037
2038/\P{Lu}/i,utf
2039    1234
2040 0: 1
2041\= Expect no match
2042    ABC
2043No match
2044
2045/\p{Ll}/i,utf
2046    a
2047 0: a
2048    Az
2049 0: z
2050\= Expect no match
2051    ABC
2052No match
2053
2054/\p{Lu}/i,utf
2055    A
2056 0: A
2057    a\x{10a0}B
2058 0: \x{10a0}
2059\= Expect no match
2060    a
2061No match
2062    \x{1d00}
2063No match
2064
2065/\p{Lu}/i,utf
2066    A
2067 0: A
2068    aZ
2069 0: Z
2070\= Expect no match
2071    abc
2072No match
2073
2074/[\x{c0}\x{391}]/i,utf
2075    \x{c0}
2076 0: \x{c0}
2077    \x{e0}
2078 0: \x{e0}
2079
2080# The next two are special cases where the lengths of the different cases of
2081# the same character differ. The first went wrong with heap frame storage; the
2082# second was broken in all cases.
2083
2084/^\x{023a}+?(\x{0130}+)/i,utf
2085  \x{023a}\x{2c65}\x{0130}
2086 0: \x{23a}\x{2c65}\x{130}
2087 1: \x{130}
2088
2089/^\x{023a}+([^X])/i,utf
2090  \x{023a}\x{2c65}X
2091 0: \x{23a}\x{2c65}
2092 1: \x{2c65}
2093
2094/\x{c0}+\x{116}+/i,utf
2095    \x{c0}\x{e0}\x{116}\x{117}
2096 0: \x{c0}\x{e0}\x{116}\x{117}
2097
2098/[\x{c0}\x{116}]+/i,utf
2099    \x{c0}\x{e0}\x{116}\x{117}
2100 0: \x{c0}\x{e0}\x{116}\x{117}
2101
2102/(\x{de})\1/i,utf
2103    \x{de}\x{de}
2104 0: \x{de}\x{de}
2105 1: \x{de}
2106    \x{de}\x{fe}
2107 0: \x{de}\x{fe}
2108 1: \x{de}
2109    \x{fe}\x{fe}
2110 0: \x{fe}\x{fe}
2111 1: \x{fe}
2112    \x{fe}\x{de}
2113 0: \x{fe}\x{de}
2114 1: \x{fe}
2115
2116/^\x{c0}$/i,utf
2117    \x{c0}
2118 0: \x{c0}
2119    \x{e0}
2120 0: \x{e0}
2121
2122/^\x{e0}$/i,utf
2123    \x{c0}
2124 0: \x{c0}
2125    \x{e0}
2126 0: \x{e0}
2127
2128# The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
2129# will match it only with UCP support, because without that it has no notion
2130# of case for anything other than the ASCII letters.
2131
2132/((?i)[\x{c0}])/utf
2133    \x{c0}
2134 0: \x{c0}
2135 1: \x{c0}
2136    \x{e0}
2137 0: \x{e0}
2138 1: \x{e0}
2139
2140/(?i:[\x{c0}])/utf
2141    \x{c0}
2142 0: \x{c0}
2143    \x{e0}
2144 0: \x{e0}
2145
2146# These are PCRE's extra properties to help with Unicodizing \d etc.
2147
2148/^\p{Xan}/utf
2149    ABCD
2150 0: A
2151    1234
2152 0: 1
2153    \x{6ca}
2154 0: \x{6ca}
2155    \x{a6c}
2156 0: \x{a6c}
2157    \x{10a7}
2158 0: \x{10a7}
2159\= Expect no match
2160    _ABC
2161No match
2162
2163/^\p{Xan}+/utf
2164    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2165 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2166\= Expect no match
2167    _ABC
2168No match
2169
2170/^\p{Xan}+?/utf
2171    \x{6ca}\x{a6c}\x{10a7}_
2172 0: \x{6ca}
2173
2174/^\p{Xan}*/utf
2175    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2176 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2177
2178/^\p{Xan}{2,9}/utf
2179    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2180 0: ABCD1234\x{6ca}
2181
2182/^\p{Xan}{2,9}?/utf
2183    \x{6ca}\x{a6c}\x{10a7}_
2184 0: \x{6ca}\x{a6c}
2185
2186/^[\p{Xan}]/utf
2187    ABCD1234_
2188 0: A
2189    1234abcd_
2190 0: 1
2191    \x{6ca}
2192 0: \x{6ca}
2193    \x{a6c}
2194 0: \x{a6c}
2195    \x{10a7}
2196 0: \x{10a7}
2197\= Expect no match
2198    _ABC
2199No match
2200
2201/^[\p{Xan}]+/utf
2202    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2203 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2204\= Expect no match
2205    _ABC
2206No match
2207
2208/^>\p{Xsp}/utf
2209    >\x{1680}\x{2028}\x{0b}
2210 0: >\x{1680}
2211    >\x{a0}
2212 0: >\x{a0}
2213\= Expect no match
2214    \x{0b}
2215No match
2216
2217/^>\p{Xsp}+/utf
2218    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2219 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2220
2221/^>\p{Xsp}+?/utf
2222    >\x{1680}\x{2028}\x{0b}
2223 0: >\x{1680}
2224
2225/^>\p{Xsp}*/utf
2226    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2227 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2228
2229/^>\p{Xsp}{2,9}/utf
2230    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2231 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2232
2233/^>\p{Xsp}{2,9}?/utf
2234    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2235 0: > \x{09}
2236
2237/^>[\p{Xsp}]/utf
2238    >\x{2028}\x{0b}
2239 0: >\x{2028}
2240
2241/^>[\p{Xsp}]+/utf
2242    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2243 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2244
2245/^>\p{Xps}/utf
2246    >\x{1680}\x{2028}\x{0b}
2247 0: >\x{1680}
2248    >\x{a0}
2249 0: >\x{a0}
2250\= Expect no match
2251    \x{0b}
2252No match
2253
2254/^>\p{Xps}+/utf
2255    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2256 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2257
2258/^>\p{Xps}+?/utf
2259    >\x{1680}\x{2028}\x{0b}
2260 0: >\x{1680}
2261
2262/^>\p{Xps}*/utf
2263    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2264 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2265
2266/^>\p{Xps}{2,9}/utf
2267    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2268 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2269
2270/^>\p{Xps}{2,9}?/utf
2271    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2272 0: > \x{09}
2273
2274/^>[\p{Xps}]/utf
2275    >\x{2028}\x{0b}
2276 0: >\x{2028}
2277
2278/^>[\p{Xps}]+/utf
2279    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2280 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2281
2282/^\p{Xwd}/utf
2283    ABCD
2284 0: A
2285    1234
2286 0: 1
2287    \x{6ca}
2288 0: \x{6ca}
2289    \x{a6c}
2290 0: \x{a6c}
2291    \x{10a7}
2292 0: \x{10a7}
2293    _ABC
2294 0: _
2295\= Expect no match
2296    []
2297No match
2298
2299/^\p{Xwd}+/utf
2300    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2301 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2302
2303/^\p{Xwd}+?/utf
2304    \x{6ca}\x{a6c}\x{10a7}_
2305 0: \x{6ca}
2306
2307/^\p{Xwd}*/utf
2308    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2309 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2310
2311/^\p{Xwd}{2,9}/utf
2312    A_B12\x{6ca}\x{a6c}\x{10a7}
2313 0: A_B12\x{6ca}\x{a6c}\x{10a7}
2314
2315/^\p{Xwd}{2,9}?/utf
2316    \x{6ca}\x{a6c}\x{10a7}_
2317 0: \x{6ca}\x{a6c}
2318
2319/^[\p{Xwd}]/utf
2320    ABCD1234_
2321 0: A
2322    1234abcd_
2323 0: 1
2324    \x{6ca}
2325 0: \x{6ca}
2326    \x{a6c}
2327 0: \x{a6c}
2328    \x{10a7}
2329 0: \x{10a7}
2330    _ABC
2331 0: _
2332\= Expect no match
2333    []
2334No match
2335
2336/^[\p{Xwd}]+/utf
2337    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2338 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2339
2340# A check not in UTF-8 mode
2341
2342/^[\p{Xwd}]+/
2343    ABCD1234_
2344 0: ABCD1234_
2345
2346# Some negative checks
2347
2348/^[\P{Xwd}]+/utf
2349    !.+\x{019}\x{35a}AB
2350 0: !.+\x{19}\x{35a}
2351
2352/^[\p{^Xwd}]+/utf
2353    !.+\x{019}\x{35a}AB
2354 0: !.+\x{19}\x{35a}
2355
2356/[\D]/B,utf,ucp
2357------------------------------------------------------------------
2358        Bra
2359        [\P{Nd}]
2360        Ket
2361        End
2362------------------------------------------------------------------
2363    1\x{3c8}2
2364 0: \x{3c8}
2365
2366/[\d]/B,utf,ucp
2367------------------------------------------------------------------
2368        Bra
2369        [\p{Nd}]
2370        Ket
2371        End
2372------------------------------------------------------------------
2373    >\x{6f4}<
2374 0: \x{6f4}
2375
2376/[\S]/B,utf,ucp
2377------------------------------------------------------------------
2378        Bra
2379        [\P{Xsp}]
2380        Ket
2381        End
2382------------------------------------------------------------------
2383    \x{1680}\x{6f4}\x{1680}
2384 0: \x{6f4}
2385
2386/[\s]/B,utf,ucp
2387------------------------------------------------------------------
2388        Bra
2389        [\p{Xsp}]
2390        Ket
2391        End
2392------------------------------------------------------------------
2393    >\x{1680}<
2394 0: \x{1680}
2395
2396/[\W]/B,utf,ucp
2397------------------------------------------------------------------
2398        Bra
2399        [\P{Xwd}]
2400        Ket
2401        End
2402------------------------------------------------------------------
2403    A\x{1712}B
2404 0: \x{1712}
2405
2406/[\w]/B,utf,ucp
2407------------------------------------------------------------------
2408        Bra
2409        [\p{Xwd}]
2410        Ket
2411        End
2412------------------------------------------------------------------
2413    >\x{1723}<
2414 0: \x{1723}
2415
2416/\D/B,utf,ucp
2417------------------------------------------------------------------
2418        Bra
2419        notprop Nd
2420        Ket
2421        End
2422------------------------------------------------------------------
2423    1\x{3c8}2
2424 0: \x{3c8}
2425
2426/\d/B,utf,ucp
2427------------------------------------------------------------------
2428        Bra
2429        prop Nd
2430        Ket
2431        End
2432------------------------------------------------------------------
2433    >\x{6f4}<
2434 0: \x{6f4}
2435
2436/\S/B,utf,ucp
2437------------------------------------------------------------------
2438        Bra
2439        notprop Xsp
2440        Ket
2441        End
2442------------------------------------------------------------------
2443    \x{1680}\x{6f4}\x{1680}
2444 0: \x{6f4}
2445
2446/\s/B,utf,ucp
2447------------------------------------------------------------------
2448        Bra
2449        prop Xsp
2450        Ket
2451        End
2452------------------------------------------------------------------
2453    >\x{1680}>
2454 0: \x{1680}
2455
2456/\W/B,utf,ucp
2457------------------------------------------------------------------
2458        Bra
2459        notprop Xwd
2460        Ket
2461        End
2462------------------------------------------------------------------
2463    A\x{1712}B
2464 0: \x{1712}
2465
2466/\w/B,utf,ucp
2467------------------------------------------------------------------
2468        Bra
2469        prop Xwd
2470        Ket
2471        End
2472------------------------------------------------------------------
2473    >\x{1723}<
2474 0: \x{1723}
2475
2476/[[:alpha:]]/B,ucp
2477------------------------------------------------------------------
2478        Bra
2479        [\p{L}]
2480        Ket
2481        End
2482------------------------------------------------------------------
2483
2484/[[:lower:]]/B,ucp
2485------------------------------------------------------------------
2486        Bra
2487        [\p{Ll}]
2488        Ket
2489        End
2490------------------------------------------------------------------
2491
2492/[[:upper:]]/B,ucp
2493------------------------------------------------------------------
2494        Bra
2495        [\p{Lu}]
2496        Ket
2497        End
2498------------------------------------------------------------------
2499
2500/[[:alnum:]]/B,ucp
2501------------------------------------------------------------------
2502        Bra
2503        [\p{Xan}]
2504        Ket
2505        End
2506------------------------------------------------------------------
2507
2508/[[:ascii:]]/B,ucp
2509------------------------------------------------------------------
2510        Bra
2511        [\x00-\x7f]
2512        Ket
2513        End
2514------------------------------------------------------------------
2515
2516/[[:cntrl:]]/B,ucp
2517------------------------------------------------------------------
2518        Bra
2519        [\p{Cc}]
2520        Ket
2521        End
2522------------------------------------------------------------------
2523
2524/[[:digit:]]/B,ucp
2525------------------------------------------------------------------
2526        Bra
2527        [\p{Nd}]
2528        Ket
2529        End
2530------------------------------------------------------------------
2531
2532/[[:graph:]]/B,ucp
2533------------------------------------------------------------------
2534        Bra
2535        [[:graph:]]
2536        Ket
2537        End
2538------------------------------------------------------------------
2539
2540/[[:print:]]/B,ucp
2541------------------------------------------------------------------
2542        Bra
2543        [[:print:]]
2544        Ket
2545        End
2546------------------------------------------------------------------
2547
2548/[[:punct:]]/B,ucp
2549------------------------------------------------------------------
2550        Bra
2551        [[:punct:]]
2552        Ket
2553        End
2554------------------------------------------------------------------
2555
2556/[[:space:]]/B,ucp
2557------------------------------------------------------------------
2558        Bra
2559        [\p{Xps}]
2560        Ket
2561        End
2562------------------------------------------------------------------
2563
2564/[[:word:]]/B,ucp
2565------------------------------------------------------------------
2566        Bra
2567        [\p{Xwd}]
2568        Ket
2569        End
2570------------------------------------------------------------------
2571
2572/[[:xdigit:]]/B,ucp
2573------------------------------------------------------------------
2574        Bra
2575        [0-9A-Fa-f]
2576        Ket
2577        End
2578------------------------------------------------------------------
2579
2580# Unicode properties for \b abd \B
2581
2582/\b...\B/utf,ucp
2583    abc_
2584 0: abc
2585    \x{37e}abc\x{376}
2586 0: abc
2587    \x{37e}\x{376}\x{371}\x{393}\x{394}
2588 0: \x{376}\x{371}\x{393}
2589    !\x{c0}++\x{c1}\x{c2}
2590 0: ++\x{c1}
2591    !\x{c0}+++++
2592 0: \x{c0}++
2593
2594# Without PCRE_UCP, non-ASCII always fail, even if < 256
2595
2596/\b...\B/utf
2597    abc_
2598 0: abc
2599\= Expect no match
2600    \x{37e}abc\x{376}
2601No match
2602    \x{37e}\x{376}\x{371}\x{393}\x{394}
2603No match
2604    !\x{c0}++\x{c1}\x{c2}
2605No match
2606    !\x{c0}+++++
2607No match
2608
2609# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
2610
2611/\b...\B/ucp
2612    abc_
2613 0: abc
2614    !\x{c0}++\x{c1}\x{c2}
2615 0: ++\xc1
2616    !\x{c0}+++++
2617 0: \xc0++
2618
2619# Some of these are silly, but they check various combinations
2620
2621/[[:^alpha:][:^cntrl:]]+/B,utf,ucp
2622------------------------------------------------------------------
2623        Bra
2624        [\P{L}\P{Cc}]++
2625        Ket
2626        End
2627------------------------------------------------------------------
2628    123
2629 0: 123
2630    abc
2631 0: abc
2632
2633/[[:^cntrl:][:^alpha:]]+/B,utf,ucp
2634------------------------------------------------------------------
2635        Bra
2636        [\P{Cc}\P{L}]++
2637        Ket
2638        End
2639------------------------------------------------------------------
2640    123
2641 0: 123
2642    abc
2643 0: abc
2644
2645/[[:alpha:]]+/B,utf,ucp
2646------------------------------------------------------------------
2647        Bra
2648        [\p{L}]++
2649        Ket
2650        End
2651------------------------------------------------------------------
2652    abc
2653 0: abc
2654
2655/[[:^alpha:]\S]+/B,utf,ucp
2656------------------------------------------------------------------
2657        Bra
2658        [\P{L}\P{Xsp}]++
2659        Ket
2660        End
2661------------------------------------------------------------------
2662    123
2663 0: 123
2664    abc
2665 0: abc
2666
2667/[^\d]+/B,utf,ucp
2668------------------------------------------------------------------
2669        Bra
2670        [^\p{Nd}]++
2671        Ket
2672        End
2673------------------------------------------------------------------
2674    abc123
2675 0: abc
2676    abc\x{123}
2677 0: abc\x{123}
2678    \x{660}abc
2679 0: abc
2680
2681/\p{Lu}+9\p{Lu}+B\p{Lu}+b/B
2682------------------------------------------------------------------
2683        Bra
2684        prop Lu ++
2685        9
2686        prop Lu +
2687        B
2688        prop Lu ++
2689        b
2690        Ket
2691        End
2692------------------------------------------------------------------
2693
2694/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/B
2695------------------------------------------------------------------
2696        Bra
2697        notprop Lu +
2698        9
2699        notprop Lu ++
2700        B
2701        notprop Lu +
2702        b
2703        Ket
2704        End
2705------------------------------------------------------------------
2706
2707/\P{Lu}+9\P{Lu}+B\P{Lu}+b/B
2708------------------------------------------------------------------
2709        Bra
2710        notprop Lu +
2711        9
2712        notprop Lu ++
2713        B
2714        notprop Lu +
2715        b
2716        Ket
2717        End
2718------------------------------------------------------------------
2719
2720/\p{Han}+X\p{Greek}+\x{370}/B,utf
2721------------------------------------------------------------------
2722        Bra
2723        prop Han ++
2724        X
2725        prop Greek +
2726        \x{370}
2727        Ket
2728        End
2729------------------------------------------------------------------
2730
2731/\p{Xan}+!\p{Xan}+A/B
2732------------------------------------------------------------------
2733        Bra
2734        prop Xan ++
2735        !
2736        prop Xan +
2737        A
2738        Ket
2739        End
2740------------------------------------------------------------------
2741
2742/\p{Xsp}+!\p{Xsp}\t/B
2743------------------------------------------------------------------
2744        Bra
2745        prop Xsp ++
2746        !
2747        prop Xsp
2748        \x09
2749        Ket
2750        End
2751------------------------------------------------------------------
2752
2753/\p{Xps}+!\p{Xps}\t/B
2754------------------------------------------------------------------
2755        Bra
2756        prop Xps ++
2757        !
2758        prop Xps
2759        \x09
2760        Ket
2761        End
2762------------------------------------------------------------------
2763
2764/\p{Xwd}+!\p{Xwd}_/B
2765------------------------------------------------------------------
2766        Bra
2767        prop Xwd ++
2768        !
2769        prop Xwd
2770        _
2771        Ket
2772        End
2773------------------------------------------------------------------
2774
2775/A+\p{N}A+\dB+\p{N}*B+\d*/B,ucp
2776------------------------------------------------------------------
2777        Bra
2778        A++
2779        prop N
2780        A++
2781        prop Nd
2782        B+
2783        prop N *+
2784        B++
2785        prop Nd *+
2786        Ket
2787        End
2788------------------------------------------------------------------
2789
2790# These behaved oddly in Perl, so they are kept in this test
2791
2792/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2793\= Expect no match
2794    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2795No match
2796
2797/(ȺȺȺ)?\1/i,utf
2798\= Expect no match
2799    ȺȺȺⱥⱥ
2800No match
2801
2802/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2803    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2804 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2805 1: \x{23a}\x{23a}\x{23a}
2806
2807/(ȺȺȺ)?\1/i,utf
2808    ȺȺȺⱥⱥⱥ
2809 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2810 1: \x{23a}\x{23a}\x{23a}
2811
2812/(\x{23a}\x{23a}\x{23a})\1/i,utf
2813\= Expect no match
2814    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2815No match
2816
2817/(ȺȺȺ)\1/i,utf
2818\= Expect no match
2819    ȺȺȺⱥⱥ
2820No match
2821
2822/(\x{23a}\x{23a}\x{23a})\1/i,utf
2823    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2824 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2825 1: \x{23a}\x{23a}\x{23a}
2826
2827/(ȺȺȺ)\1/i,utf
2828    ȺȺȺⱥⱥⱥ
2829 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2830 1: \x{23a}\x{23a}\x{23a}
2831
2832/(\x{2c65}\x{2c65})\1/i,utf
2833    \x{2c65}\x{2c65}\x{23a}\x{23a}
2834 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2835 1: \x{2c65}\x{2c65}
2836
2837/(ⱥⱥ)\1/i,utf
2838    ⱥⱥȺȺ
2839 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2840 1: \x{2c65}\x{2c65}
2841
2842/(\x{23a}\x{23a}\x{23a})\1Y/i,utf
2843    X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
2844 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
2845 1: \x{23a}\x{23a}\x{23a}
2846
2847/(\x{2c65}\x{2c65})\1Y/i,utf
2848    X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
2849 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
2850 1: \x{2c65}\x{2c65}
2851
2852# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
2853
2854/^[\p{Batak}]/utf
2855    \x{1bc0}
2856 0: \x{1bc0}
2857    \x{1bff}
2858 0: \x{1bff}
2859\= Expect no match
2860    \x{1bf4}
2861No match
2862
2863/^[\p{Brahmi}]/utf
2864    \x{11000}
2865 0: \x{11000}
2866    \x{1106f}
2867 0: \x{1106f}
2868\= Expect no match
2869    \x{1104e}
2870No match
2871
2872/^[\p{Mandaic}]/utf
2873    \x{840}
2874 0: \x{840}
2875    \x{85e}
2876 0: \x{85e}
2877\= Expect no match
2878    \x{85c}
2879No match
2880    \x{85d}
2881No match
2882
2883/(\X*)(.)/s,utf
2884    A\x{300}
2885 0: A
2886 1:
2887 2: A
2888
2889/^S(\X*)e(\X*)$/utf
2890    Stéréo
2891 0: Ste\x{301}re\x{301}o
2892 1: te\x{301}r
2893 2: \x{301}o
2894
2895/^\X/utf
2896    ́réo
2897 0: \x{301}
2898
2899/^a\X41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
2900    aX41z
2901 0: aX41z
2902\= Expect no match
2903    aAz
2904No match
2905
2906/\X/
2907    a\=ps
2908 0: a
2909    a\=ph
2910Partial match: a
2911
2912/\Xa/
2913    aa\=ps
2914 0: aa
2915    aa\=ph
2916 0: aa
2917
2918/\X{2}/
2919    aa\=ps
2920 0: aa
2921    aa\=ph
2922Partial match: aa
2923
2924/\X+a/
2925    a\=ps
2926Partial match: a
2927    aa\=ps
2928 0: aa
2929    aa\=ph
2930Partial match: aa
2931
2932/\X+?a/
2933    a\=ps
2934Partial match: a
2935    ab\=ps
2936Partial match: ab
2937    aa\=ps
2938 0: aa
2939    aa\=ph
2940 0: aa
2941    aba\=ps
2942 0: aba
2943
2944# These Unicode 6.1.0 scripts are not known to Perl.
2945
2946/\p{Chakma}\d/utf,ucp
2947    \x{11100}\x{1113c}
2948 0: \x{11100}\x{1113c}
2949
2950/\p{Takri}\d/utf,ucp
2951    \x{11680}\x{116c0}
2952 0: \x{11680}\x{116c0}
2953
2954/^\X/utf
2955    A\=ps
2956 0: A
2957    A\=ph
2958Partial match: A
2959    A\x{300}\x{301}\=ps
2960 0: A\x{300}\x{301}
2961    A\x{300}\x{301}\=ph
2962Partial match: A\x{300}\x{301}
2963    A\x{301}\=ps
2964 0: A\x{301}
2965    A\x{301}\=ph
2966Partial match: A\x{301}
2967
2968/^\X{2,3}/utf
2969    A\=ps
2970Partial match: A
2971    A\=ph
2972Partial match: A
2973    AA\=ps
2974 0: AA
2975    AA\=ph
2976Partial match: AA
2977    A\x{300}\x{301}\=ps
2978Partial match: A\x{300}\x{301}
2979    A\x{300}\x{301}\=ph
2980Partial match: A\x{300}\x{301}
2981    A\x{300}\x{301}A\x{300}\x{301}\=ps
2982 0: A\x{300}\x{301}A\x{300}\x{301}
2983    A\x{300}\x{301}A\x{300}\x{301}\=ph
2984Partial match: A\x{300}\x{301}A\x{300}\x{301}
2985
2986/^\X{2}/utf
2987    AA\=ps
2988 0: AA
2989    AA\=ph
2990Partial match: AA
2991    A\x{300}\x{301}A\x{300}\x{301}\=ps
2992 0: A\x{300}\x{301}A\x{300}\x{301}
2993    A\x{300}\x{301}A\x{300}\x{301}\=ph
2994Partial match: A\x{300}\x{301}A\x{300}\x{301}
2995
2996/^\X+/utf
2997    AA\=ps
2998 0: AA
2999    AA\=ph
3000Partial match: AA
3001
3002/^\X+?Z/utf
3003    AA\=ps
3004Partial match: AA
3005    AA\=ph
3006Partial match: AA
3007
3008/A\x{3a3}B/IBi,utf
3009------------------------------------------------------------------
3010        Bra
3011     /i A
3012        clist 03a3 03c2 03c3
3013     /i B
3014        Ket
3015        End
3016------------------------------------------------------------------
3017Capturing subpattern count = 0
3018Options: caseless utf
3019First code unit = 'A' (caseless)
3020Last code unit = 'B' (caseless)
3021Subject length lower bound = 3
3022
3023/[\x{3a3}]/Bi,utf
3024------------------------------------------------------------------
3025        Bra
3026        clist 03a3 03c2 03c3
3027        Ket
3028        End
3029------------------------------------------------------------------
3030
3031/[^\x{3a3}]/Bi,utf
3032------------------------------------------------------------------
3033        Bra
3034        not clist 03a3 03c2 03c3
3035        Ket
3036        End
3037------------------------------------------------------------------
3038
3039/[\x{3a3}]+/Bi,utf
3040------------------------------------------------------------------
3041        Bra
3042        clist 03a3 03c2 03c3 ++
3043        Ket
3044        End
3045------------------------------------------------------------------
3046
3047/[^\x{3a3}]+/Bi,utf
3048------------------------------------------------------------------
3049        Bra
3050        not clist 03a3 03c2 03c3 ++
3051        Ket
3052        End
3053------------------------------------------------------------------
3054
3055/a*\x{3a3}/Bi,utf
3056------------------------------------------------------------------
3057        Bra
3058     /i a*+
3059        clist 03a3 03c2 03c3
3060        Ket
3061        End
3062------------------------------------------------------------------
3063
3064/\x{3a3}+a/Bi,utf
3065------------------------------------------------------------------
3066        Bra
3067        clist 03a3 03c2 03c3 ++
3068     /i a
3069        Ket
3070        End
3071------------------------------------------------------------------
3072
3073/\x{3a3}*\x{3c2}/Bi,utf
3074------------------------------------------------------------------
3075        Bra
3076        clist 03a3 03c2 03c3 *
3077        clist 03a3 03c2 03c3
3078        Ket
3079        End
3080------------------------------------------------------------------
3081
3082/\x{3a3}{3}/i,utf,aftertext
3083    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3084 0: \x{3a3}\x{3c3}\x{3c2}
3085 0+ \x{3a3}\x{3c3}\x{3c2}
3086
3087/\x{3a3}{2,4}/i,utf,aftertext
3088    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3089 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}
3090 0+ \x{3c3}\x{3c2}
3091
3092/\x{3a3}{2,4}?/i,utf,aftertext
3093    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3094 0: \x{3a3}\x{3c3}
3095 0+ \x{3c2}\x{3a3}\x{3c3}\x{3c2}
3096
3097/\x{3a3}+./i,utf,aftertext
3098    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3099 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3100 0+
3101
3102/\x{3a3}++./i,utf,aftertext
3103\= Expect no match
3104    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3105No match
3106
3107/\x{3a3}*\x{3c2}/Bi,utf
3108------------------------------------------------------------------
3109        Bra
3110        clist 03a3 03c2 03c3 *
3111        clist 03a3 03c2 03c3
3112        Ket
3113        End
3114------------------------------------------------------------------
3115
3116/[^\x{3a3}]*\x{3c2}/Bi,utf
3117------------------------------------------------------------------
3118        Bra
3119        not clist 03a3 03c2 03c3 *+
3120        clist 03a3 03c2 03c3
3121        Ket
3122        End
3123------------------------------------------------------------------
3124
3125/[^a]*\x{3c2}/Bi,utf
3126------------------------------------------------------------------
3127        Bra
3128     /i [^a]*
3129        clist 03a3 03c2 03c3
3130        Ket
3131        End
3132------------------------------------------------------------------
3133
3134/ist/Bi,utf
3135------------------------------------------------------------------
3136        Bra
3137     /i i
3138        clist 0053 0073 017f
3139     /i t
3140        Ket
3141        End
3142------------------------------------------------------------------
3143\= Expect no match
3144    ikt
3145No match
3146
3147/is+t/i,utf
3148    iSs\x{17f}t
3149 0: iSs\x{17f}t
3150\= Expect no match
3151    ikt
3152No match
3153
3154/is+?t/i,utf
3155\= Expect no match
3156    ikt
3157No match
3158
3159/is?t/i,utf
3160\= Expect no match
3161    ikt
3162No match
3163
3164/is{2}t/i,utf
3165\= Expect no match
3166    iskt
3167No match
3168
3169# This property is a PCRE special
3170
3171/^\p{Xuc}/utf
3172    $abc
3173 0: $
3174    @abc
3175 0: @
3176    `abc
3177 0: `
3178    \x{1234}abc
3179 0: \x{1234}
3180\= Expect no match
3181    abc
3182No match
3183
3184/^\p{Xuc}+/utf
3185    $@`\x{a0}\x{1234}\x{e000}**
3186 0: $@`\x{a0}\x{1234}\x{e000}
3187\= Expect no match
3188    \x{9f}
3189No match
3190
3191/^\p{Xuc}+?/utf
3192    $@`\x{a0}\x{1234}\x{e000}**
3193 0: $
3194\= Expect no match
3195    \x{9f}
3196No match
3197
3198/^\p{Xuc}+?\*/utf
3199    $@`\x{a0}\x{1234}\x{e000}**
3200 0: $@`\x{a0}\x{1234}\x{e000}*
3201\= Expect no match
3202    \x{9f}
3203No match
3204
3205/^\p{Xuc}++/utf
3206    $@`\x{a0}\x{1234}\x{e000}**
3207 0: $@`\x{a0}\x{1234}\x{e000}
3208\= Expect no match
3209    \x{9f}
3210No match
3211
3212/^\p{Xuc}{3,5}/utf
3213    $@`\x{a0}\x{1234}\x{e000}**
3214 0: $@`\x{a0}\x{1234}
3215\= Expect no match
3216    \x{9f}
3217No match
3218
3219/^\p{Xuc}{3,5}?/utf
3220    $@`\x{a0}\x{1234}\x{e000}**
3221 0: $@`
3222\= Expect no match
3223    \x{9f}
3224No match
3225
3226/^[\p{Xuc}]/utf
3227    $@`\x{a0}\x{1234}\x{e000}**
3228 0: $
3229\= Expect no match
3230    \x{9f}
3231No match
3232
3233/^[\p{Xuc}]+/utf
3234    $@`\x{a0}\x{1234}\x{e000}**
3235 0: $@`\x{a0}\x{1234}\x{e000}
3236\= Expect no match
3237    \x{9f}
3238No match
3239
3240/^\P{Xuc}/utf
3241    abc
3242 0: a
3243\= Expect no match
3244    $abc
3245No match
3246    @abc
3247No match
3248    `abc
3249No match
3250    \x{1234}abc
3251No match
3252
3253/^[\P{Xuc}]/utf
3254    abc
3255 0: a
3256\= Expect no match
3257    $abc
3258No match
3259    @abc
3260No match
3261    `abc
3262No match
3263    \x{1234}abc
3264No match
3265
3266# Some auto-possessification tests
3267
3268/\pN+\z/B
3269------------------------------------------------------------------
3270        Bra
3271        prop N ++
3272        \z
3273        Ket
3274        End
3275------------------------------------------------------------------
3276
3277/\PN+\z/B
3278------------------------------------------------------------------
3279        Bra
3280        notprop N ++
3281        \z
3282        Ket
3283        End
3284------------------------------------------------------------------
3285
3286/\pN+/B
3287------------------------------------------------------------------
3288        Bra
3289        prop N ++
3290        Ket
3291        End
3292------------------------------------------------------------------
3293
3294/\PN+/B
3295------------------------------------------------------------------
3296        Bra
3297        notprop N ++
3298        Ket
3299        End
3300------------------------------------------------------------------
3301
3302/\p{Any}+\p{Any} \p{Any}+\P{Any} \p{Any}+\p{L&} \p{Any}+\p{L} \p{Any}+\p{Lu} \p{Any}+\p{Han} \p{Any}+\p{Xan} \p{Any}+\p{Xsp} \p{Any}+\p{Xps} \p{Xwd}+\p{Any} \p{Any}+\p{Xuc}/Bx,ucp
3303------------------------------------------------------------------
3304        Bra
3305        prop Any +
3306        prop Any
3307        prop Any +
3308        notprop Any
3309        prop Any +
3310        prop L&
3311        prop Any +
3312        prop L
3313        prop Any +
3314        prop Lu
3315        prop Any +
3316        prop Han
3317        prop Any +
3318        prop Xan
3319        prop Any +
3320        prop Xsp
3321        prop Any +
3322        prop Xps
3323        prop Xwd +
3324        prop Any
3325        prop Any +
3326        prop Xuc
3327        Ket
3328        End
3329------------------------------------------------------------------
3330
3331/\p{L&}+\p{Any} \p{L&}+\p{L&} \P{L&}+\p{L&} \p{L&}+\p{L} \p{L&}+\p{Lu} \p{L&}+\p{Han} \p{L&}+\p{Xan} \p{L&}+\P{Xan} \p{L&}+\p{Xsp} \p{L&}+\p{Xps} \p{Xwd}+\p{L&} \p{L&}+\p{Xuc}/Bx,ucp
3332------------------------------------------------------------------
3333        Bra
3334        prop L& +
3335        prop Any
3336        prop L& +
3337        prop L&
3338        notprop L& ++
3339        prop L&
3340        prop L& +
3341        prop L
3342        prop L& +
3343        prop Lu
3344        prop L& +
3345        prop Han
3346        prop L& +
3347        prop Xan
3348        prop L& ++
3349        notprop Xan
3350        prop L& ++
3351        prop Xsp
3352        prop L& ++
3353        prop Xps
3354        prop Xwd +
3355        prop L&
3356        prop L& +
3357        prop Xuc
3358        Ket
3359        End
3360------------------------------------------------------------------
3361
3362/\p{N}+\p{Any} \p{N}+\p{L&} \p{N}+\p{L} \p{N}+\P{L} \p{N}+\P{N} \p{N}+\p{Lu} \p{N}+\p{Han} \p{N}+\p{Xan} \p{N}+\p{Xsp} \p{N}+\p{Xps} \p{Xwd}+\p{N} \p{N}+\p{Xuc}/Bx,ucp
3363------------------------------------------------------------------
3364        Bra
3365        prop N +
3366        prop Any
3367        prop N +
3368        prop L&
3369        prop N ++
3370        prop L
3371        prop N +
3372        notprop L
3373        prop N ++
3374        notprop N
3375        prop N ++
3376        prop Lu
3377        prop N +
3378        prop Han
3379        prop N +
3380        prop Xan
3381        prop N ++
3382        prop Xsp
3383        prop N ++
3384        prop Xps
3385        prop Xwd +
3386        prop N
3387        prop N +
3388        prop Xuc
3389        Ket
3390        End
3391------------------------------------------------------------------
3392
3393/\p{Lu}+\p{Any} \p{Lu}+\p{L&} \p{Lu}+\p{L} \p{Lu}+\p{Lu} \P{Lu}+\p{Lu} \p{Lu}+\p{Nd} \p{Lu}+\P{Nd} \p{Lu}+\p{Han} \p{Lu}+\p{Xan} \p{Lu}+\p{Xsp} \p{Lu}+\p{Xps} \p{Xwd}+\p{Lu} \p{Lu}+\p{Xuc}/Bx,ucp
3394------------------------------------------------------------------
3395        Bra
3396        prop Lu +
3397        prop Any
3398        prop Lu +
3399        prop L&
3400        prop Lu +
3401        prop L
3402        prop Lu +
3403        prop Lu
3404        notprop Lu ++
3405        prop Lu
3406        prop Lu ++
3407        prop Nd
3408        prop Lu +
3409        notprop Nd
3410        prop Lu +
3411        prop Han
3412        prop Lu +
3413        prop Xan
3414        prop Lu ++
3415        prop Xsp
3416        prop Lu ++
3417        prop Xps
3418        prop Xwd +
3419        prop Lu
3420        prop Lu +
3421        prop Xuc
3422        Ket
3423        End
3424------------------------------------------------------------------
3425
3426/\p{Han}+\p{Lu} \p{Han}+\p{L&} \p{Han}+\p{L} \p{Han}+\p{Lu} \p{Han}+\p{Arabic} \p{Arabic}+\p{Arabic} \p{Han}+\p{Xan} \p{Han}+\p{Xsp} \p{Han}+\p{Xps} \p{Xwd}+\p{Han} \p{Han}+\p{Xuc}/Bx,ucp
3427------------------------------------------------------------------
3428        Bra
3429        prop Han +
3430        prop Lu
3431        prop Han +
3432        prop L&
3433        prop Han +
3434        prop L
3435        prop Han +
3436        prop Lu
3437        prop Han ++
3438        prop Arabic
3439        prop Arabic +
3440        prop Arabic
3441        prop Han +
3442        prop Xan
3443        prop Han +
3444        prop Xsp
3445        prop Han +
3446        prop Xps
3447        prop Xwd +
3448        prop Han
3449        prop Han +
3450        prop Xuc
3451        Ket
3452        End
3453------------------------------------------------------------------
3454
3455/\p{Xan}+\p{Any} \p{Xan}+\p{L&} \P{Xan}+\p{L&} \p{Xan}+\p{L} \p{Xan}+\p{Lu} \p{Xan}+\p{Han} \p{Xan}+\p{Xan} \p{Xan}+\P{Xan} \p{Xan}+\p{Xsp} \p{Xan}+\p{Xps} \p{Xwd}+\p{Xan} \p{Xan}+\p{Xuc}/Bx,ucp
3456------------------------------------------------------------------
3457        Bra
3458        prop Xan +
3459        prop Any
3460        prop Xan +
3461        prop L&
3462        notprop Xan ++
3463        prop L&
3464        prop Xan +
3465        prop L
3466        prop Xan +
3467        prop Lu
3468        prop Xan +
3469        prop Han
3470        prop Xan +
3471        prop Xan
3472        prop Xan ++
3473        notprop Xan
3474        prop Xan ++
3475        prop Xsp
3476        prop Xan ++
3477        prop Xps
3478        prop Xwd +
3479        prop Xan
3480        prop Xan +
3481        prop Xuc
3482        Ket
3483        End
3484------------------------------------------------------------------
3485
3486/\p{Xsp}+\p{Any} \p{Xsp}+\p{L&} \p{Xsp}+\p{L} \p{Xsp}+\p{Lu} \p{Xsp}+\p{Han} \p{Xsp}+\p{Xan} \p{Xsp}+\p{Xsp} \P{Xsp}+\p{Xsp} \p{Xsp}+\p{Xps} \p{Xwd}+\p{Xsp} \p{Xsp}+\p{Xuc}/Bx,ucp
3487------------------------------------------------------------------
3488        Bra
3489        prop Xsp +
3490        prop Any
3491        prop Xsp ++
3492        prop L&
3493        prop Xsp ++
3494        prop L
3495        prop Xsp ++
3496        prop Lu
3497        prop Xsp +
3498        prop Han
3499        prop Xsp ++
3500        prop Xan
3501        prop Xsp +
3502        prop Xsp
3503        notprop Xsp ++
3504        prop Xsp
3505        prop Xsp +
3506        prop Xps
3507        prop Xwd ++
3508        prop Xsp
3509        prop Xsp +
3510        prop Xuc
3511        Ket
3512        End
3513------------------------------------------------------------------
3514
3515/\p{Xwd}+\p{Any} \p{Xwd}+\p{L&} \p{Xwd}+\p{L} \p{Xwd}+\p{Lu} \p{Xwd}+\p{Han} \p{Xwd}+\p{Xan} \p{Xwd}+\p{Xsp} \p{Xwd}+\p{Xps} \p{Xwd}+\p{Xwd} \p{Xwd}+\P{Xwd} \p{Xwd}+\p{Xuc}/Bx,ucp
3516------------------------------------------------------------------
3517        Bra
3518        prop Xwd +
3519        prop Any
3520        prop Xwd +
3521        prop L&
3522        prop Xwd +
3523        prop L
3524        prop Xwd +
3525        prop Lu
3526        prop Xwd +
3527        prop Han
3528        prop Xwd +
3529        prop Xan
3530        prop Xwd ++
3531        prop Xsp
3532        prop Xwd ++
3533        prop Xps
3534        prop Xwd +
3535        prop Xwd
3536        prop Xwd ++
3537        notprop Xwd
3538        prop Xwd +
3539        prop Xuc
3540        Ket
3541        End
3542------------------------------------------------------------------
3543
3544/\p{Xuc}+\p{Any} \p{Xuc}+\p{L&} \p{Xuc}+\p{L} \p{Xuc}+\p{Lu} \p{Xuc}+\p{Han} \p{Xuc}+\p{Xan} \p{Xuc}+\p{Xsp} \p{Xuc}+\p{Xps} \p{Xwd}+\p{Xuc} \p{Xuc}+\p{Xuc} \p{Xuc}+\P{Xuc}/Bx,ucp
3545------------------------------------------------------------------
3546        Bra
3547        prop Xuc +
3548        prop Any
3549        prop Xuc +
3550        prop L&
3551        prop Xuc +
3552        prop L
3553        prop Xuc +
3554        prop Lu
3555        prop Xuc +
3556        prop Han
3557        prop Xuc +
3558        prop Xan
3559        prop Xuc +
3560        prop Xsp
3561        prop Xuc +
3562        prop Xps
3563        prop Xwd +
3564        prop Xuc
3565        prop Xuc +
3566        prop Xuc
3567        prop Xuc ++
3568        notprop Xuc
3569        Ket
3570        End
3571------------------------------------------------------------------
3572
3573/\p{N}+\p{Ll} \p{N}+\p{Nd} \p{N}+\P{Nd}/Bx,ucp
3574------------------------------------------------------------------
3575        Bra
3576        prop N ++
3577        prop Ll
3578        prop N +
3579        prop Nd
3580        prop N +
3581        notprop Nd
3582        Ket
3583        End
3584------------------------------------------------------------------
3585
3586/\p{Xan}+\p{L} \p{Xan}+\p{N} \p{Xan}+\p{C} \p{Xan}+\P{L} \P{Xan}+\p{N} \p{Xan}+\P{C}/Bx,ucp
3587------------------------------------------------------------------
3588        Bra
3589        prop Xan +
3590        prop L
3591        prop Xan +
3592        prop N
3593        prop Xan ++
3594        prop C
3595        prop Xan +
3596        notprop L
3597        notprop Xan ++
3598        prop N
3599        prop Xan +
3600        notprop C
3601        Ket
3602        End
3603------------------------------------------------------------------
3604
3605/\p{L}+\p{Xan} \p{N}+\p{Xan} \p{C}+\p{Xan} \P{L}+\p{Xan} \p{N}+\p{Xan} \P{C}+\p{Xan} \p{L}+\P{Xan}/Bx,ucp
3606------------------------------------------------------------------
3607        Bra
3608        prop L +
3609        prop Xan
3610        prop N +
3611        prop Xan
3612        prop C ++
3613        prop Xan
3614        notprop L +
3615        prop Xan
3616        prop N +
3617        prop Xan
3618        notprop C +
3619        prop Xan
3620        prop L ++
3621        notprop Xan
3622        Ket
3623        End
3624------------------------------------------------------------------
3625
3626/\p{Xan}+\p{Lu} \p{Xan}+\p{Nd} \p{Xan}+\p{Cc} \p{Xan}+\P{Ll} \P{Xan}+\p{No} \p{Xan}+\P{Cf}/Bx,ucp
3627------------------------------------------------------------------
3628        Bra
3629        prop Xan +
3630        prop Lu
3631        prop Xan +
3632        prop Nd
3633        prop Xan ++
3634        prop Cc
3635        prop Xan +
3636        notprop Ll
3637        notprop Xan ++
3638        prop No
3639        prop Xan +
3640        notprop Cf
3641        Ket
3642        End
3643------------------------------------------------------------------
3644
3645/\p{Lu}+\p{Xan} \p{Nd}+\p{Xan} \p{Cs}+\p{Xan} \P{Lt}+\p{Xan} \p{Nl}+\p{Xan} \P{Cc}+\p{Xan} \p{Lt}+\P{Xan}/Bx,ucp
3646------------------------------------------------------------------
3647        Bra
3648        prop Lu +
3649        prop Xan
3650        prop Nd +
3651        prop Xan
3652        prop Cs ++
3653        prop Xan
3654        notprop Lt +
3655        prop Xan
3656        prop Nl +
3657        prop Xan
3658        notprop Cc +
3659        prop Xan
3660        prop Lt ++
3661        notprop Xan
3662        Ket
3663        End
3664------------------------------------------------------------------
3665
3666/\w+\p{P} \w+\p{Po} \w+\s \p{Xan}+\s \s+\p{Xan} \s+\w/Bx,ucp
3667------------------------------------------------------------------
3668        Bra
3669        prop Xwd +
3670        prop P
3671        prop Xwd +
3672        prop Po
3673        prop Xwd ++
3674        prop Xsp
3675        prop Xan ++
3676        prop Xsp
3677        prop Xsp ++
3678        prop Xan
3679        prop Xsp ++
3680        prop Xwd
3681        Ket
3682        End
3683------------------------------------------------------------------
3684
3685/\w+\P{P} \W+\p{Po} \w+\S \P{Xan}+\s \s+\P{Xan} \s+\W/Bx,ucp
3686------------------------------------------------------------------
3687        Bra
3688        prop Xwd +
3689        notprop P
3690        notprop Xwd +
3691        prop Po
3692        prop Xwd +
3693        notprop Xsp
3694        notprop Xan +
3695        prop Xsp
3696        prop Xsp +
3697        notprop Xan
3698        prop Xsp +
3699        notprop Xwd
3700        Ket
3701        End
3702------------------------------------------------------------------
3703
3704/\w+\p{Po} \w+\p{Pc} \W+\p{Po} \W+\p{Pc} \w+\P{Po} \w+\P{Pc}/Bx,ucp
3705------------------------------------------------------------------
3706        Bra
3707        prop Xwd +
3708        prop Po
3709        prop Xwd ++
3710        prop Pc
3711        notprop Xwd +
3712        prop Po
3713        notprop Xwd +
3714        prop Pc
3715        prop Xwd +
3716        notprop Po
3717        prop Xwd +
3718        notprop Pc
3719        Ket
3720        End
3721------------------------------------------------------------------
3722
3723/\p{Nl}+\p{Xan} \P{Nl}+\p{Xan} \p{Nl}+\P{Xan} \P{Nl}+\P{Xan}/Bx,ucp
3724------------------------------------------------------------------
3725        Bra
3726        prop Nl +
3727        prop Xan
3728        notprop Nl +
3729        prop Xan
3730        prop Nl ++
3731        notprop Xan
3732        notprop Nl +
3733        notprop Xan
3734        Ket
3735        End
3736------------------------------------------------------------------
3737
3738/\p{Xan}+\p{Nl} \P{Xan}+\p{Nl} \p{Xan}+\P{Nl} \P{Xan}+\P{Nl}/Bx,ucp
3739------------------------------------------------------------------
3740        Bra
3741        prop Xan +
3742        prop Nl
3743        notprop Xan ++
3744        prop Nl
3745        prop Xan +
3746        notprop Nl
3747        notprop Xan +
3748        notprop Nl
3749        Ket
3750        End
3751------------------------------------------------------------------
3752
3753/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/Bx,ucp
3754------------------------------------------------------------------
3755        Bra
3756        prop Xan +
3757        prop Nd
3758        notprop Xan ++
3759        prop Nd
3760        prop Xan +
3761        notprop Nd
3762        notprop Xan +
3763        notprop Nd
3764        Ket
3765        End
3766------------------------------------------------------------------
3767
3768# End auto-possessification tests
3769
3770/\w+/B,utf,ucp,auto_callout
3771------------------------------------------------------------------
3772        Bra
3773        Callout 255 0 3
3774        prop Xwd ++
3775        Callout 255 3 0
3776        Ket
3777        End
3778------------------------------------------------------------------
3779    abcd
3780--->abcd
3781 +0 ^        \w+
3782 +3 ^   ^
3783 0: abcd
3784
3785/[\p{N}]?+/B,no_auto_possess
3786------------------------------------------------------------------
3787        Bra
3788        [\p{N}]?+
3789        Ket
3790        End
3791------------------------------------------------------------------
3792
3793/[\p{L}ab]{2,3}+/B,no_auto_possess
3794------------------------------------------------------------------
3795        Bra
3796        [ab\p{L}]{2,3}+
3797        Ket
3798        End
3799------------------------------------------------------------------
3800
3801/\D+\X \d+\X \S+\X \s+\X \W+\X \w+\X \R+\X \H+\X \h+\X \V+\X \v+\X a+\X \n+\X .+\X/Bx
3802------------------------------------------------------------------
3803        Bra
3804        \D+
3805        extuni
3806        \d+
3807        extuni
3808        \S+
3809        extuni
3810        \s+
3811        extuni
3812        \W+
3813        extuni
3814        \w+
3815        extuni
3816        \R+
3817        extuni
3818        \H+
3819        extuni
3820        \h+
3821        extuni
3822        \V+
3823        extuni
3824        \v+
3825        extuni
3826        a+
3827        extuni
3828        \x0a+
3829        extuni
3830        Any+
3831        extuni
3832        Ket
3833        End
3834------------------------------------------------------------------
3835
3836/.+\X/Bsx
3837------------------------------------------------------------------
3838        Bra
3839        AllAny+
3840        extuni
3841        Ket
3842        End
3843------------------------------------------------------------------
3844
3845/\X+$/Bmx
3846------------------------------------------------------------------
3847        Bra
3848        extuni+
3849     /m $
3850        Ket
3851        End
3852------------------------------------------------------------------
3853
3854/\X+\D \X+\d \X+\S \X+\s \X+\W \X+\w \X+. \X+\R \X+\H \X+\h \X+\V \X+\v \X+\X \X+\Z \X+\z \X+$/Bx
3855------------------------------------------------------------------
3856        Bra
3857        extuni+
3858        \D
3859        extuni+
3860        \d
3861        extuni+
3862        \S
3863        extuni+
3864        \s
3865        extuni+
3866        \W
3867        extuni+
3868        \w
3869        extuni+
3870        Any
3871        extuni+
3872        \R
3873        extuni+
3874        \H
3875        extuni+
3876        \h
3877        extuni+
3878        \V
3879        extuni+
3880        \v
3881        extuni+
3882        extuni
3883        extuni+
3884        \Z
3885        extuni++
3886        \z
3887        extuni+
3888        $
3889        Ket
3890        End
3891------------------------------------------------------------------
3892
3893/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B,utf,ucp
3894------------------------------------------------------------------
3895        Bra
3896        prop Nd ++
3897        prop Xsp {0,5}+
3898        =
3899        prop Xsp *+
3900        notprop Xsp ?
3901        =
3902        prop Xwd {0,4}+
3903        notprop Xwd *+
3904        Ket
3905        End
3906------------------------------------------------------------------
3907
3908/[RST]+/Bi,utf,ucp
3909------------------------------------------------------------------
3910        Bra
3911        [R-Tr-t\x{17f}]++
3912        Ket
3913        End
3914------------------------------------------------------------------
3915
3916/[R-T]+/Bi,utf,ucp
3917------------------------------------------------------------------
3918        Bra
3919        [R-Tr-t\x{17f}]++
3920        Ket
3921        End
3922------------------------------------------------------------------
3923
3924/[Q-U]+/Bi,utf,ucp
3925------------------------------------------------------------------
3926        Bra
3927        [Q-Uq-u\x{17f}]++
3928        Ket
3929        End
3930------------------------------------------------------------------
3931
3932/^s?c/Iim,utf
3933Capturing subpattern count = 0
3934Options: caseless multiline utf
3935First code unit at start or follows newline
3936Last code unit = 'c' (caseless)
3937Subject length lower bound = 1
3938    scat
3939 0: sc
3940
3941/\X?abc/utf,no_start_optimize
3942    \xff\x7f\x00\x00\x03\x00\x41\xcc\x80\x41\x{300}\x61\x62\x63\x00\=no_utf_check,offset=06
3943 0: A\x{300}abc
3944
3945/\x{100}\x{200}\K\x{300}/utf,startchar
3946    \x{100}\x{200}\x{300}
3947 0: \x{100}\x{200}\x{300}
3948    ^^^^^^^^^^^^^^
3949
3950# Test UTF characters in a substitution
3951
3952bc/utf,replace=XሴZ
3953    123ábc123
3954 1: 123X\x{1234}Z123
3955
3956/(?<=abc)(|def)/g,utf,replace=<$0>
3957    123abcáyzabcdef789abcሴqr
3958 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
3959
3960/[A-`]/iB,utf
3961------------------------------------------------------------------
3962        Bra
3963        [A-z\x{212a}\x{17f}]
3964        Ket
3965        End
3966------------------------------------------------------------------
3967    abcdefghijklmno
3968 0: a
3969
3970/(?<=\K\x{17f})/g,utf,aftertext
3971    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
3972 0: \x{17f}
3973 0+ \x{17f}\x{17f}\x{17f}\x{17f}
3974 0: \x{17f}
3975 0+ \x{17f}\x{17f}\x{17f}
3976 0: \x{17f}
3977 0+ \x{17f}\x{17f}
3978 0: \x{17f}
3979 0+ \x{17f}
3980 0: \x{17f}
3981 0+
3982
3983/(?<=\K\x{17f})/altglobal,utf,aftertext
3984    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
3985 0: \x{17f}
3986 0+ \x{17f}\x{17f}\x{17f}\x{17f}
3987 0: \x{17f}
3988 0+ \x{17f}\x{17f}\x{17f}
3989 0: \x{17f}
3990 0+ \x{17f}\x{17f}
3991 0: \x{17f}
3992 0+ \x{17f}
3993 0: \x{17f}
3994 0+
3995
3996"\xa\xf<(.\pZ*\P{Xwd}+^\xa8\3'3yq.::?(?J:()\xd1+!~:3'(8?:)':(?'d'(?'d'^u]!.+.+\\A\Ah(n+?9){7}+\K;(?'X'u'(?'c'(?'z'(?<y>\xb::\xf0'|\xd3(\xae?'w(z\x8?P>l)\x8?P>a)'\H\R\xd1+!!~:3'(?:h$N{26875}\W+?\\=D{2}\x89(?i:Uy0\N({2\xa(\v\x85*){y*\A(()\p{L}+?\P{^Xan}'+?\xff\+pS\?|).{;y*\A(()\p{L}+?\8}\d?1(|)(/1){7}.+[Lp{Me}].\s\xdcC*?(?(<y>))(?<!^)$C((;*?(R))+(\xbf(R))\x8a\X*?\x8a\xb\xd1^9\3*+(\xc1,\k'R'\xb4)\xcc(z\z(?J)(?'X'\x1b(\xb\xd1^9\?'3*+P{^Xan}+?\xff\+(\xc1.]k+\xb'Pm'\xb4)\xcc4f\xa7'\xd1V(?i:U,{2,2})'(?'X'))?-%--\x95$9*\4'|\xd1(\x9c''%\x94$9)#(?'R')3\x7?('P\xed7'\xa8\xb1^u\xeaw\1\0\0\(|(?1){7}.+[\p{Me}].\s\xdcC*^\x14?(?(<y>))(?<!^)$C((;*?(R*?))+(?(R)\x8a\X*?\x8a\xb\xd1^9\3*+|(\xc1,\k'R'\xb4)\xcc! z)\z(?JJ)(?'X';(\xb\xd1^9\?'3*+(\xc1.]k+\xb'Pm'\xb4))':(?'d')(?'RD'(d')|)|$)'|(?<x>\g{d});\g{x}\x11\g{d}\x81\|$((?'X'\'X'(?'W''\x92()'9'\x83*))\xba*\!?^ <){)':;\xcc4'\xd1'(?'X'28))?-%--\x95$9*\4'|\xd1((''e\x94*$9:)*#(?'R')3)\x7?('P\xed')\\x16:;()\x1e\x10*:(?<y>)\xd1+0!~:(?)'d'E:yD!\s(?'R'\x1e;\x10:U))|'\x9g!\xb0*){)\\x16:;()\x1e\x10\x87*:(?<y>)\xd1+!~:(?)'}'\d'E:yD!\s(?'R'\x1e;\x10:U))|'))|)g!\xb0*R+9{29+)#(?'P'})*?pS\{3,}\x85,{0,}l{*UTF)(\xe{7}){3722,{9,}d{2,?|))|{)\(A?&d}}{\xa,}2}){3,}7,l{)22}(,}l:7{2,4}}29\x19+)#?'P'})*v?))\x5"
3997Failed: error 122 at offset 1227: unmatched closing parenthesis
3998
3999/$(&.+[\p{Me}].\s\xdcC*?(?(<y>))(?<!^)$C((;*?(R))+(?(R)){0,6}?|){12\x8a\X*?\x8a\x0b\xd1^9\3*+(\xc1,\k'P'\xb4)\xcc(z\z(?JJ)(?'X'8};(\x0b\xd1^9\?'3*+(\xc1.]k+\x0b'Pm'\xb4\xcc4'\xd1'(?'X'))?-%--\x95$9*\4'|\xd1(''%\x95*$9)#(?'R')3\x07?('P\xed')\\x16:;()\x1e\x10*:(?<y>)\xd1+!~:(?)''(d'E:yD!\s(?'R'\x1e;\x10:U))|')g!\xb0*){29+))#(?'P'})*?/
4000
4001"(*UTF)(*UCP)(.UTF).+X(\V+;\^(\D|)!999}(?(?C{7(?C')\H*\S*/^\x5\xa\\xd3\x85n?(;\D*(?m).[^mH+((*UCP)(*U:F)})(?!^)(?'"
4002Failed: error 124 at offset 113: letter or underscore expected after (?< or (?'
4003
4004/[\pS#moq]/
4005    =
4006 0: =
4007
4008/(*:a\x{12345}b\t(d\)c)xxx/utf,alt_verbnames,mark
4009    cxxxz
4010 0: xxx
4011MK: a\x{12345}b\x{09}(d)c
4012
4013/abcd/utf,replace=x\x{824}y\o{3333}z(\Q12\$34$$\x34\E5$$),substitute_extended
4014    abcd
4015 1: x\x{824}y\x{6db}z(12\$34$$\x345$)
4016
4017/a(\x{e0}\x{101})(\x{c0}\x{102})/utf,replace=a\u$1\U$1\E$1\l$2\L$2\Eab\U\x{e0}\x{101}\L\x{d0}\x{160}\EDone,substitute_extended
4018    a\x{e0}\x{101}\x{c0}\x{102}
4019 1: a\x{c0}\x{101}\x{c0}\x{100}\x{e0}\x{101}\x{e0}\x{102}\x{e0}\x{103}ab\x{c0}\x{100}\x{f0}\x{161}Done
4020
4021/((?<digit>\d)|(?<letter>\p{L}))/g,substitute_extended,replace=<${digit:+digit; :not digit; }${letter:+letter:not a letter}>
4022    ab12cde
4023 7: <not digit; letter><not digit; letter><digit; not a letter><digit; not a letter><not digit; letter><not digit; letter><not digit; letter>
4024
4025/[\W\p{Any}]/B
4026------------------------------------------------------------------
4027        Bra
4028        [\x00-/:-@[-^`{-\xff\p{Any}]
4029        Ket
4030        End
4031------------------------------------------------------------------
4032    abc
4033 0: a
4034    123
4035 0: 1
4036
4037/[\W\pL]/B
4038------------------------------------------------------------------
4039        Bra
4040        [\x00-/:-@[-^`{-\xff\p{L}]
4041        Ket
4042        End
4043------------------------------------------------------------------
4044    abc
4045 0: a
4046\= Expect no match
4047    123
4048No match
4049
4050/(*UCP)(*UTF)[[:>:]]X/B
4051------------------------------------------------------------------
4052        Bra
4053        \b
4054        AssertB
4055        Reverse
4056        prop Xwd
4057        Ket
4058        X
4059        Ket
4060        End
4061------------------------------------------------------------------
4062
4063/abc/utf,replace=xyz
4064    abc\=zero_terminate
4065 1: xyz
4066
4067/a[[:punct:]b]/ucp,bincode
4068------------------------------------------------------------------
4069        Bra
4070        a
4071        [b[:punct:]]
4072        Ket
4073        End
4074------------------------------------------------------------------
4075
4076/a[[:punct:]b]/utf,ucp,bincode
4077------------------------------------------------------------------
4078        Bra
4079        a
4080        [b[:punct:]]
4081        Ket
4082        End
4083------------------------------------------------------------------
4084
4085/a[b[:punct:]]/utf,ucp,bincode
4086------------------------------------------------------------------
4087        Bra
4088        a
4089        [b[:punct:]]
4090        Ket
4091        End
4092------------------------------------------------------------------
4093
4094/[[:^ascii:]]/utf,ucp,bincode
4095------------------------------------------------------------------
4096        Bra
4097        [\x80-\xff] (neg)
4098        Ket
4099        End
4100------------------------------------------------------------------
4101
4102/[[:^ascii:]\w]/utf,ucp,bincode
4103------------------------------------------------------------------
4104        Bra
4105        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4106        Ket
4107        End
4108------------------------------------------------------------------
4109
4110/[\w[:^ascii:]]/utf,ucp,bincode
4111------------------------------------------------------------------
4112        Bra
4113        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4114        Ket
4115        End
4116------------------------------------------------------------------
4117
4118/[^[:ascii:]\W]/utf,ucp,bincode
4119------------------------------------------------------------------
4120        Bra
4121        [^\x00-\x7f\P{Xwd}]
4122        Ket
4123        End
4124------------------------------------------------------------------
4125    \x{de}
4126 0: \x{de}
4127    \x{200}
4128 0: \x{200}
4129\= Expect no match
4130    \x{300}
4131No match
4132    \x{37e}
4133No match
4134
4135/[[:^ascii:]a]/utf,ucp,bincode
4136------------------------------------------------------------------
4137        Bra
4138        [a\x80-\xff] (neg)
4139        Ket
4140        End
4141------------------------------------------------------------------
4142
4143/L(?#(|++<!(2)?/B,utf,no_auto_possess,auto_callout
4144------------------------------------------------------------------
4145        Bra
4146        Callout 255 0 14
4147        L?
4148        Callout 255 14 0
4149        Ket
4150        End
4151------------------------------------------------------------------
4152
4153/L(?#(|++<!(2)?/B,utf,ucp,auto_callout
4154------------------------------------------------------------------
4155        Bra
4156        Callout 255 0 14
4157        L?+
4158        Callout 255 14 0
4159        Ket
4160        End
4161------------------------------------------------------------------
4162
4163/(*UTF)C\x09((?<!'(?x)!*H? #\xcc\x9a[^$]/
4164Failed: error 114 at offset 39: missing closing parenthesis
4165
4166# End of testinput5
4167