xref: /aosp_15_r20/external/pcre/testdata/testoutput5 (revision 22dc650d8ae982c6770746019a6f94af92b0f024)
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#newline_default lf any anycrlf
7
8# PCRE2 and Perl disagree about the characteristics of certain Unicode
9# characters. For example, 061C was considered by Perl to be Arabic, though
10# it was not listed as such in the Unicode Scripts.txt file for Unicode 8.
11# However, it *is* in that file for Unicode 10, but when I came to re-check,
12# Perl had changed in the meantime, with 5.026 not recognizing it as Arabic.
13
14# 2066-2069 are graphic and printable according to Perl, though they are
15# actually "isolate" control characters. That is why the following tests are
16# here rather than in test 4.
17
18/^[\p{Arabic}]/utf
19    \x{061c}
20 0: \x{61c}
21
22/^[[:graph:]]+$/utf,ucp
23\= Expect no match
24    \x{61c}
25No match
26    \x{2066}
27No match
28    \x{2067}
29No match
30    \x{2068}
31No match
32    \x{2069}
33No match
34
35/^[[:print:]]+$/utf,ucp
36\= Expect no match
37    \x{61c}
38No match
39    \x{2066}
40No match
41    \x{2067}
42No match
43    \x{2068}
44No match
45    \x{2069}
46No match
47
48/^[[:^graph:]]+$/utf,ucp
49    \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}
50 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}
51    \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}
52 0: \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}
53
54/^[[:^print:]]+$/utf,ucp
55    \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
56 0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
57    \x{2068}\x{2069}
58 0: \x{2068}\x{2069}
59
60# Perl does not consider U+180e to be a space character. It is true that it
61# does not appear in the Unicode PropList.txt file as such, but in many other
62# sources it is listed as a space, and has been treated as such in PCRE for
63# a long time.
64
65/^>[[:blank:]]*/utf,ucp
66    >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
67 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09}
68
69/^A\s+Z/utf,ucp
70    A\x{85}\x{180e}\x{2005}Z
71 0: A\x{85}\x{180e}\x{2005}Z
72
73/^A[\s]+Z/utf,ucp
74    A\x{2005}Z
75 0: A\x{2005}Z
76    A\x{85}\x{2005}Z
77 0: A\x{85}\x{2005}Z
78
79/^[[:graph:]]+$/utf,ucp
80\= Expect no match
81    \x{180e}
82No match
83
84/^[[:print:]]+$/utf,ucp
85    \x{180e}
86 0: \x{180e}
87
88/^[[:^graph:]]+$/utf,ucp
89    \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e}
90 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}\x{180e}
91
92/^[[:^print:]]+$/utf,ucp
93\= Expect no match
94    \x{180e}
95No match
96
97# End of U+180E tests.
98
99# ---------------------------------------------------------------------
100
101/\x{110000}/IB,utf
102Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
103
104/\o{4200000}/IB,utf
105Failed: error 134 at offset 10: character code point value in \x{} or \o{} is too large
106
107/\x{ffffffff}/utf
108Failed: error 134 at offset 11: character code point value in \x{} or \o{} is too large
109
110/\o{37777777777}/utf
111Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
112
113/\x{100000000}/utf
114Failed: error 134 at offset 12: character code point value in \x{} or \o{} is too large
115
116/\o{77777777777}/utf
117Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
118
119/\x{d800}/utf
120Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
121
122/\o{154000}/utf
123Failed: error 173 at offset 9: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
124
125/\x{dfff}/utf
126Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
127
128/\o{157777}/utf
129Failed: error 173 at offset 9: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
130
131/\x{d7ff}/utf
132
133/\o{153777}/utf
134
135/\x{e000}/utf
136
137/\o{170000}/utf
138
139/^\x{100}a\x{1234}/utf
140    \x{100}a\x{1234}bcd
141 0: \x{100}a\x{1234}
142
143/\x{0041}\x{2262}\x{0391}\x{002e}/IB,utf
144------------------------------------------------------------------
145        Bra
146        A\x{2262}\x{391}.
147        Ket
148        End
149------------------------------------------------------------------
150Capture group count = 0
151Options: utf
152First code unit = 'A'
153Last code unit = '.'
154Subject length lower bound = 4
155    \x{0041}\x{2262}\x{0391}\x{002e}
156 0: A\x{2262}\x{391}.
157
158/.{3,5}X/IB,utf
159------------------------------------------------------------------
160        Bra
161        Any{3}
162        Any{0,2}
163        X
164        Ket
165        End
166------------------------------------------------------------------
167Capture group count = 0
168Options: utf
169Last code unit = 'X'
170Subject length lower bound = 4
171    \x{212ab}\x{212ab}\x{212ab}\x{861}X
172 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
173
174/.{3,5}?/IB,utf
175------------------------------------------------------------------
176        Bra
177        Any{3}
178        Any{0,2}?
179        Ket
180        End
181------------------------------------------------------------------
182Capture group count = 0
183Options: utf
184Subject length lower bound = 3
185    \x{212ab}\x{212ab}\x{212ab}\x{861}
186 0: \x{212ab}\x{212ab}\x{212ab}
187
188/^[ab]/IB,utf
189------------------------------------------------------------------
190        Bra
191        ^
192        [ab]
193        Ket
194        End
195------------------------------------------------------------------
196Capture group count = 0
197Compile options: utf
198Overall options: anchored utf
199Starting code units: a b
200Subject length lower bound = 1
201    bar
202 0: b
203\= Expect no match
204    c
205No match
206    \x{ff}
207No match
208    \x{100}
209No match
210
211/\x{100}*(\d+|"(?1)")/utf
212    1234
213 0: 1234
214 1: 1234
215    "1234"
216 0: "1234"
217 1: "1234"
218    \x{100}1234
219 0: \x{100}1234
220 1: 1234
221    "\x{100}1234"
222 0: \x{100}1234
223 1: 1234
224    \x{100}\x{100}12ab
225 0: \x{100}\x{100}12
226 1: 12
227    \x{100}\x{100}"12"
228 0: \x{100}\x{100}"12"
229 1: "12"
230\= Expect no match
231    \x{100}\x{100}abcd
232No match
233
234/\x{100}*/IB,utf
235------------------------------------------------------------------
236        Bra
237        \x{100}*+
238        Ket
239        End
240------------------------------------------------------------------
241Capture group count = 0
242May match empty string
243Options: utf
244Subject length lower bound = 0
245
246/a\x{100}*/IB,utf
247------------------------------------------------------------------
248        Bra
249        a
250        \x{100}*+
251        Ket
252        End
253------------------------------------------------------------------
254Capture group count = 0
255Options: utf
256First code unit = 'a'
257Subject length lower bound = 1
258
259/ab\x{100}*/IB,utf
260------------------------------------------------------------------
261        Bra
262        ab
263        \x{100}*+
264        Ket
265        End
266------------------------------------------------------------------
267Capture group count = 0
268Options: utf
269First code unit = 'a'
270Last code unit = 'b'
271Subject length lower bound = 2
272
273/[\x{200}-\x{100}]/utf
274Failed: error 108 at offset 15: range out of order in character class
275
276/[Ā-Ą]/utf
277    \x{100}
278 0: \x{100}
279    \x{104}
280 0: \x{104}
281\= Expect no match
282    \x{105}
283No match
284    \x{ff}
285No match
286
287/[\xFF]/IB
288------------------------------------------------------------------
289        Bra
290        \x{ff}
291        Ket
292        End
293------------------------------------------------------------------
294Capture group count = 0
295First code unit = \xff
296Subject length lower bound = 1
297    >\xff<
298 0: \xff
299
300/[^\xFF]/IB
301------------------------------------------------------------------
302        Bra
303        [^\x{ff}]
304        Ket
305        End
306------------------------------------------------------------------
307Capture group count = 0
308Subject length lower bound = 1
309
310/[Ä-Ü]/utf
311    Ö # Matches without Study
312 0: \x{d6}
313    \x{d6}
314 0: \x{d6}
315
316/[Ä-Ü]/utf
317    Ö <-- Same with Study
318 0: \x{d6}
319    \x{d6}
320 0: \x{d6}
321
322/[\x{c4}-\x{dc}]/utf
323    Ö # Matches without Study
324 0: \x{d6}
325    \x{d6}
326 0: \x{d6}
327
328/[\x{c4}-\x{dc}]/utf
329    Ö <-- Same with Study
330 0: \x{d6}
331    \x{d6}
332 0: \x{d6}
333
334/[^\x{100}]abc(xyz(?1))/IB,utf
335------------------------------------------------------------------
336        Bra
337        [^\x{100}]
338        abc
339        CBra 1
340        xyz
341        Recurse
342        Ket
343        Ket
344        End
345------------------------------------------------------------------
346Capture group count = 1
347Options: utf
348Last code unit = 'z'
349Subject length lower bound = 7
350
351/(\x{100}(b(?2)c))?/IB,utf
352------------------------------------------------------------------
353        Bra
354        Brazero
355        CBra 1
356        \x{100}
357        CBra 2
358        b
359        Recurse
360        c
361        Ket
362        Ket
363        Ket
364        End
365------------------------------------------------------------------
366Capture group count = 2
367May match empty string
368Options: utf
369Subject length lower bound = 0
370
371/(\x{100}(b(?2)c)){0,2}/IB,utf
372------------------------------------------------------------------
373        Bra
374        Brazero
375        Bra
376        CBra 1
377        \x{100}
378        CBra 2
379        b
380        Recurse
381        c
382        Ket
383        Ket
384        Brazero
385        CBra 1
386        \x{100}
387        CBra 2
388        b
389        Recurse
390        c
391        Ket
392        Ket
393        Ket
394        Ket
395        End
396------------------------------------------------------------------
397Capture group count = 2
398May match empty string
399Options: utf
400Subject length lower bound = 0
401
402/(\x{100}(b(?1)c))?/IB,utf
403------------------------------------------------------------------
404        Bra
405        Brazero
406        CBra 1
407        \x{100}
408        CBra 2
409        b
410        Recurse
411        c
412        Ket
413        Ket
414        Ket
415        End
416------------------------------------------------------------------
417Capture group count = 2
418May match empty string
419Options: utf
420Subject length lower bound = 0
421
422/(\x{100}(b(?1)c)){0,2}/IB,utf
423------------------------------------------------------------------
424        Bra
425        Brazero
426        Bra
427        CBra 1
428        \x{100}
429        CBra 2
430        b
431        Recurse
432        c
433        Ket
434        Ket
435        Brazero
436        CBra 1
437        \x{100}
438        CBra 2
439        b
440        Recurse
441        c
442        Ket
443        Ket
444        Ket
445        Ket
446        End
447------------------------------------------------------------------
448Capture group count = 2
449May match empty string
450Options: utf
451Subject length lower bound = 0
452
453/\W/utf
454    A.B
455 0: .
456    A\x{100}B
457 0: \x{100}
458
459/\w/utf
460    \x{100}X
461 0: X
462
463# Use no_start_optimize because the first code unit is different in 8-bit from
464# the wider modes.
465
466/^\ሴ/IB,utf,no_start_optimize
467------------------------------------------------------------------
468        Bra
469        ^
470        \x{1234}
471        Ket
472        End
473------------------------------------------------------------------
474Capture group count = 0
475Compile options: no_start_optimize utf
476Overall options: anchored no_start_optimize utf
477
478/()()()()()()()()()()
479 ()()()()()()()()()()
480 ()()()()()()()()()()
481 ()()()()()()()()()()
482 A (x) (?41) B/x,utf
483    AxxB
484Matched, but too many substrings
485 0: AxxB
486 1:
487 2:
488 3:
489 4:
490 5:
491 6:
492 7:
493 8:
494 9:
49510:
49611:
49712:
49813:
49914:
500
501/^[\x{100}\E-\Q\E\x{150}]/B,utf
502------------------------------------------------------------------
503        Bra
504        ^
505        [\x{100}-\x{150}]
506        Ket
507        End
508------------------------------------------------------------------
509
510/^[\QĀ\E-\QŐ\E]/B,utf
511------------------------------------------------------------------
512        Bra
513        ^
514        [\x{100}-\x{150}]
515        Ket
516        End
517------------------------------------------------------------------
518
519/^abc./gmx,newline=any,utf
520    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
521 0: abc1
522 0: abc2
523 0: abc3
524 0: abc4
525 0: abc5
526 0: abc6
527 0: abc7
528 0: abc8
529 0: abc9
530
531/abc.$/gmx,newline=any,utf
532    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
533 0: abc1
534 0: abc2
535 0: abc3
536 0: abc4
537 0: abc5
538 0: abc6
539 0: abc7
540 0: abc8
541 0: abc9
542
543/^a\Rb/bsr=unicode,utf
544    a\nb
545 0: a\x{0a}b
546    a\rb
547 0: a\x{0d}b
548    a\r\nb
549 0: a\x{0d}\x{0a}b
550    a\x0bb
551 0: a\x{0b}b
552    a\x0cb
553 0: a\x{0c}b
554    a\x{85}b
555 0: a\x{85}b
556    a\x{2028}b
557 0: a\x{2028}b
558    a\x{2029}b
559 0: a\x{2029}b
560\= Expect no match
561    a\n\rb
562No match
563
564/^a\R*b/bsr=unicode,utf
565    ab
566 0: ab
567    a\nb
568 0: a\x{0a}b
569    a\rb
570 0: a\x{0d}b
571    a\r\nb
572 0: a\x{0d}\x{0a}b
573    a\x0bb
574 0: a\x{0b}b
575    a\x0c\x{2028}\x{2029}b
576 0: a\x{0c}\x{2028}\x{2029}b
577    a\x{85}b
578 0: a\x{85}b
579    a\n\rb
580 0: a\x{0a}\x{0d}b
581    a\n\r\x{85}\x0cb
582 0: a\x{0a}\x{0d}\x{85}\x{0c}b
583
584/^a\R+b/bsr=unicode,utf
585    a\nb
586 0: a\x{0a}b
587    a\rb
588 0: a\x{0d}b
589    a\r\nb
590 0: a\x{0d}\x{0a}b
591    a\x0bb
592 0: a\x{0b}b
593    a\x0c\x{2028}\x{2029}b
594 0: a\x{0c}\x{2028}\x{2029}b
595    a\x{85}b
596 0: a\x{85}b
597    a\n\rb
598 0: a\x{0a}\x{0d}b
599    a\n\r\x{85}\x0cb
600 0: a\x{0a}\x{0d}\x{85}\x{0c}b
601\= Expect no match
602    ab
603No match
604
605/^a\R{1,3}b/bsr=unicode,utf
606    a\nb
607 0: a\x{0a}b
608    a\n\rb
609 0: a\x{0a}\x{0d}b
610    a\n\r\x{85}b
611 0: a\x{0a}\x{0d}\x{85}b
612    a\r\n\r\nb
613 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
614    a\r\n\r\n\r\nb
615 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
616    a\n\r\n\rb
617 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
618    a\n\n\r\nb
619 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
620\= Expect no match
621    a\n\n\n\rb
622No match
623    a\r
624No match
625
626/\H\h\V\v/utf
627    X X\x0a
628 0: X X\x{0a}
629    X\x09X\x0b
630 0: X\x{09}X\x{0b}
631\= Expect no match
632    \x{a0} X\x0a
633No match
634
635/\H*\h+\V?\v{3,4}/utf
636    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
637 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
638    \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
639 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
640    \x09\x20\x{a0}\x0a\x0b\x0c
641 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
642\= Expect no match
643    \x09\x20\x{a0}\x0a\x0b
644No match
645
646/\H\h\V\v/utf
647    \x{3001}\x{3000}\x{2030}\x{2028}
648 0: \x{3001}\x{3000}\x{2030}\x{2028}
649    X\x{180e}X\x{85}
650 0: X\x{180e}X\x{85}
651\= Expect no match
652    \x{2009} X\x0a
653No match
654
655/\H*\h+\V?\v{3,4}/utf
656    \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
657 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
658    \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
659 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
660    \x09\x20\x{202f}\x0a\x0b\x0c
661 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
662\= Expect no match
663    \x09\x{200a}\x{a0}\x{2028}\x0b
664No match
665
666/[\h]/B,utf
667------------------------------------------------------------------
668        Bra
669        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
670        Ket
671        End
672------------------------------------------------------------------
673    >\x{1680}
674 0: \x{1680}
675
676/[\h]{3,}/B,utf
677------------------------------------------------------------------
678        Bra
679        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}+
680        Ket
681        End
682------------------------------------------------------------------
683    >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
684 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
685
686/[\v]/B,utf
687------------------------------------------------------------------
688        Bra
689        [\x0a-\x0d\x85\x{2028}-\x{2029}]
690        Ket
691        End
692------------------------------------------------------------------
693
694/[\H]/B,utf
695------------------------------------------------------------------
696        Bra
697        [\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}]
698        Ket
699        End
700------------------------------------------------------------------
701
702/[\V]/B,utf
703------------------------------------------------------------------
704        Bra
705        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}]
706        Ket
707        End
708------------------------------------------------------------------
709
710/.*$/newline=any,utf
711    \x{1ec5}
712 0: \x{1ec5}
713
714/a\Rb/I,bsr=anycrlf,utf
715Capture group count = 0
716Options: utf
717\R matches CR, LF, or CRLF
718First code unit = 'a'
719Last code unit = 'b'
720Subject length lower bound = 3
721    a\rb
722 0: a\x{0d}b
723    a\nb
724 0: a\x{0a}b
725    a\r\nb
726 0: a\x{0d}\x{0a}b
727\= Expect no match
728    a\x{85}b
729No match
730    a\x0bb
731No match
732
733/a\Rb/I,bsr=unicode,utf
734Capture group count = 0
735Options: utf
736\R matches any Unicode newline
737First code unit = 'a'
738Last code unit = 'b'
739Subject length lower bound = 3
740    a\rb
741 0: a\x{0d}b
742    a\nb
743 0: a\x{0a}b
744    a\r\nb
745 0: a\x{0d}\x{0a}b
746    a\x{85}b
747 0: a\x{85}b
748    a\x0bb
749 0: a\x{0b}b
750
751/a\R?b/I,bsr=anycrlf,utf
752Capture group count = 0
753Options: utf
754\R matches CR, LF, or CRLF
755First code unit = 'a'
756Last code unit = 'b'
757Subject length lower bound = 2
758    a\rb
759 0: a\x{0d}b
760    a\nb
761 0: a\x{0a}b
762    a\r\nb
763 0: a\x{0d}\x{0a}b
764\= Expect no match
765    a\x{85}b
766No match
767    a\x0bb
768No match
769
770/a\R?b/I,bsr=unicode,utf
771Capture group count = 0
772Options: utf
773\R matches any Unicode newline
774First code unit = 'a'
775Last code unit = 'b'
776Subject length lower bound = 2
777    a\rb
778 0: a\x{0d}b
779    a\nb
780 0: a\x{0a}b
781    a\r\nb
782 0: a\x{0d}\x{0a}b
783    a\x{85}b
784 0: a\x{85}b
785    a\x0bb
786 0: a\x{0b}b
787
788/.*a.*=.b.*/utf,newline=any
789    QQQ\x{2029}ABCaXYZ=!bPQR
790 0: ABCaXYZ=!bPQR
791\= Expect no match
792    a\x{2029}b
793No match
794    \x61\xe2\x80\xa9\x62
795No match
796
797/[[:a\x{100}b:]]/utf
798Failed: error 130 at offset 3: unknown POSIX class name
799
800/a[^]b/utf,allow_empty_class,match_unset_backref
801    a\x{1234}b
802 0: a\x{1234}b
803    a\nb
804 0: a\x{0a}b
805\= Expect no match
806    ab
807No match
808
809/a[^]+b/utf,allow_empty_class,match_unset_backref
810    aXb
811 0: aXb
812    a\nX\nX\x{1234}b
813 0: a\x{0a}X\x{0a}X\x{1234}b
814\= Expect no match
815    ab
816No match
817
818/(\x{de})\1/
819    \x{de}\x{de}
820 0: \xde\xde
821 1: \xde
822
823/X/newline=any,utf,firstline
824    A\x{1ec5}ABCXYZ
825 0: X
826
827/Xa{2,4}b/utf
828    X\=ps
829Partial match: X
830    Xa\=ps
831Partial match: Xa
832    Xaa\=ps
833Partial match: Xaa
834    Xaaa\=ps
835Partial match: Xaaa
836    Xaaaa\=ps
837Partial match: Xaaaa
838
839/Xa{2,4}?b/utf
840    X\=ps
841Partial match: X
842    Xa\=ps
843Partial match: Xa
844    Xaa\=ps
845Partial match: Xaa
846    Xaaa\=ps
847Partial match: Xaaa
848    Xaaaa\=ps
849Partial match: Xaaaa
850
851/Xa{2,4}+b/utf
852    X\=ps
853Partial match: X
854    Xa\=ps
855Partial match: Xa
856    Xaa\=ps
857Partial match: Xaa
858    Xaaa\=ps
859Partial match: Xaaa
860    Xaaaa\=ps
861Partial match: Xaaaa
862
863/X\x{123}{2,4}b/utf
864    X\=ps
865Partial match: X
866    X\x{123}\=ps
867Partial match: X\x{123}
868    X\x{123}\x{123}\=ps
869Partial match: X\x{123}\x{123}
870    X\x{123}\x{123}\x{123}\=ps
871Partial match: X\x{123}\x{123}\x{123}
872    X\x{123}\x{123}\x{123}\x{123}\=ps
873Partial match: X\x{123}\x{123}\x{123}\x{123}
874
875/X\x{123}{2,4}?b/utf
876    X\=ps
877Partial match: X
878    X\x{123}\=ps
879Partial match: X\x{123}
880    X\x{123}\x{123}\=ps
881Partial match: X\x{123}\x{123}
882    X\x{123}\x{123}\x{123}\=ps
883Partial match: X\x{123}\x{123}\x{123}
884    X\x{123}\x{123}\x{123}\x{123}\=ps
885Partial match: X\x{123}\x{123}\x{123}\x{123}
886
887/X\x{123}{2,4}+b/utf
888    X\=ps
889Partial match: X
890    X\x{123}\=ps
891Partial match: X\x{123}
892    X\x{123}\x{123}\=ps
893Partial match: X\x{123}\x{123}
894    X\x{123}\x{123}\x{123}\=ps
895Partial match: X\x{123}\x{123}\x{123}
896    X\x{123}\x{123}\x{123}\x{123}\=ps
897Partial match: X\x{123}\x{123}\x{123}\x{123}
898
899/X\x{123}{2,4}b/utf
900\= Expect no match
901    Xx\=ps
902No match
903    X\x{123}x\=ps
904No match
905    X\x{123}\x{123}x\=ps
906No match
907    X\x{123}\x{123}\x{123}x\=ps
908No match
909    X\x{123}\x{123}\x{123}\x{123}x\=ps
910No match
911
912/X\x{123}{2,4}?b/utf
913\= Expect no match
914    Xx\=ps
915No match
916    X\x{123}x\=ps
917No match
918    X\x{123}\x{123}x\=ps
919No match
920    X\x{123}\x{123}\x{123}x\=ps
921No match
922    X\x{123}\x{123}\x{123}\x{123}x\=ps
923No match
924
925/X\x{123}{2,4}+b/utf
926\= Expect no match
927    Xx\=ps
928No match
929    X\x{123}x\=ps
930No match
931    X\x{123}\x{123}x\=ps
932No match
933    X\x{123}\x{123}\x{123}x\=ps
934No match
935    X\x{123}\x{123}\x{123}\x{123}x\=ps
936No match
937
938/X\d{2,4}b/utf
939    X\=ps
940Partial match: X
941    X3\=ps
942Partial match: X3
943    X33\=ps
944Partial match: X33
945    X333\=ps
946Partial match: X333
947    X3333\=ps
948Partial match: X3333
949
950/X\d{2,4}?b/utf
951    X\=ps
952Partial match: X
953    X3\=ps
954Partial match: X3
955    X33\=ps
956Partial match: X33
957    X333\=ps
958Partial match: X333
959    X3333\=ps
960Partial match: X3333
961
962/X\d{2,4}+b/utf
963    X\=ps
964Partial match: X
965    X3\=ps
966Partial match: X3
967    X33\=ps
968Partial match: X33
969    X333\=ps
970Partial match: X333
971    X3333\=ps
972Partial match: X3333
973
974/X\D{2,4}b/utf
975    X\=ps
976Partial match: X
977    Xa\=ps
978Partial match: Xa
979    Xaa\=ps
980Partial match: Xaa
981    Xaaa\=ps
982Partial match: Xaaa
983    Xaaaa\=ps
984Partial match: Xaaaa
985
986/X\D{2,4}?b/utf
987    X\=ps
988Partial match: X
989    Xa\=ps
990Partial match: Xa
991    Xaa\=ps
992Partial match: Xaa
993    Xaaa\=ps
994Partial match: Xaaa
995    Xaaaa\=ps
996Partial match: Xaaaa
997
998/X\D{2,4}+b/utf
999    X\=ps
1000Partial match: X
1001    Xa\=ps
1002Partial match: Xa
1003    Xaa\=ps
1004Partial match: Xaa
1005    Xaaa\=ps
1006Partial match: Xaaa
1007    Xaaaa\=ps
1008Partial match: Xaaaa
1009
1010/X\D{2,4}b/utf
1011    X\=ps
1012Partial match: X
1013    X\x{123}\=ps
1014Partial match: X\x{123}
1015    X\x{123}\x{123}\=ps
1016Partial match: X\x{123}\x{123}
1017    X\x{123}\x{123}\x{123}\=ps
1018Partial match: X\x{123}\x{123}\x{123}
1019    X\x{123}\x{123}\x{123}\x{123}\=ps
1020Partial match: X\x{123}\x{123}\x{123}\x{123}
1021
1022/X\D{2,4}?b/utf
1023    X\=ps
1024Partial match: X
1025    X\x{123}\=ps
1026Partial match: X\x{123}
1027    X\x{123}\x{123}\=ps
1028Partial match: X\x{123}\x{123}
1029    X\x{123}\x{123}\x{123}\=ps
1030Partial match: X\x{123}\x{123}\x{123}
1031    X\x{123}\x{123}\x{123}\x{123}\=ps
1032Partial match: X\x{123}\x{123}\x{123}\x{123}
1033
1034/X\D{2,4}+b/utf
1035    X\=ps
1036Partial match: X
1037    X\x{123}\=ps
1038Partial match: X\x{123}
1039    X\x{123}\x{123}\=ps
1040Partial match: X\x{123}\x{123}
1041    X\x{123}\x{123}\x{123}\=ps
1042Partial match: X\x{123}\x{123}\x{123}
1043    X\x{123}\x{123}\x{123}\x{123}\=ps
1044Partial match: X\x{123}\x{123}\x{123}\x{123}
1045
1046/X[abc]{2,4}b/utf
1047    X\=ps
1048Partial match: X
1049    Xa\=ps
1050Partial match: Xa
1051    Xaa\=ps
1052Partial match: Xaa
1053    Xaaa\=ps
1054Partial match: Xaaa
1055    Xaaaa\=ps
1056Partial match: Xaaaa
1057
1058/X[abc]{2,4}?b/utf
1059    X\=ps
1060Partial match: X
1061    Xa\=ps
1062Partial match: Xa
1063    Xaa\=ps
1064Partial match: Xaa
1065    Xaaa\=ps
1066Partial match: Xaaa
1067    Xaaaa\=ps
1068Partial match: Xaaaa
1069
1070/X[abc]{2,4}+b/utf
1071    X\=ps
1072Partial match: X
1073    Xa\=ps
1074Partial match: Xa
1075    Xaa\=ps
1076Partial match: Xaa
1077    Xaaa\=ps
1078Partial match: Xaaa
1079    Xaaaa\=ps
1080Partial match: Xaaaa
1081
1082/X[abc\x{123}]{2,4}b/utf
1083    X\=ps
1084Partial match: X
1085    X\x{123}\=ps
1086Partial match: X\x{123}
1087    X\x{123}\x{123}\=ps
1088Partial match: X\x{123}\x{123}
1089    X\x{123}\x{123}\x{123}\=ps
1090Partial match: X\x{123}\x{123}\x{123}
1091    X\x{123}\x{123}\x{123}\x{123}\=ps
1092Partial match: X\x{123}\x{123}\x{123}\x{123}
1093
1094/X[abc\x{123}]{2,4}?b/utf
1095    X\=ps
1096Partial match: X
1097    X\x{123}\=ps
1098Partial match: X\x{123}
1099    X\x{123}\x{123}\=ps
1100Partial match: X\x{123}\x{123}
1101    X\x{123}\x{123}\x{123}\=ps
1102Partial match: X\x{123}\x{123}\x{123}
1103    X\x{123}\x{123}\x{123}\x{123}\=ps
1104Partial match: X\x{123}\x{123}\x{123}\x{123}
1105
1106/X[abc\x{123}]{2,4}+b/utf
1107    X\=ps
1108Partial match: X
1109    X\x{123}\=ps
1110Partial match: X\x{123}
1111    X\x{123}\x{123}\=ps
1112Partial match: X\x{123}\x{123}
1113    X\x{123}\x{123}\x{123}\=ps
1114Partial match: X\x{123}\x{123}\x{123}
1115    X\x{123}\x{123}\x{123}\x{123}\=ps
1116Partial match: X\x{123}\x{123}\x{123}\x{123}
1117
1118/X[^a]{2,4}b/utf
1119    X\=ps
1120Partial match: X
1121    Xz\=ps
1122Partial match: Xz
1123    Xzz\=ps
1124Partial match: Xzz
1125    Xzzz\=ps
1126Partial match: Xzzz
1127    Xzzzz\=ps
1128Partial match: Xzzzz
1129
1130/X[^a]{2,4}?b/utf
1131    X\=ps
1132Partial match: X
1133    Xz\=ps
1134Partial match: Xz
1135    Xzz\=ps
1136Partial match: Xzz
1137    Xzzz\=ps
1138Partial match: Xzzz
1139    Xzzzz\=ps
1140Partial match: Xzzzz
1141
1142/X[^a]{2,4}+b/utf
1143    X\=ps
1144Partial match: X
1145    Xz\=ps
1146Partial match: Xz
1147    Xzz\=ps
1148Partial match: Xzz
1149    Xzzz\=ps
1150Partial match: Xzzz
1151    Xzzzz\=ps
1152Partial match: Xzzzz
1153
1154/X[^a]{2,4}b/utf
1155    X\=ps
1156Partial match: X
1157    X\x{123}\=ps
1158Partial match: X\x{123}
1159    X\x{123}\x{123}\=ps
1160Partial match: X\x{123}\x{123}
1161    X\x{123}\x{123}\x{123}\=ps
1162Partial match: X\x{123}\x{123}\x{123}
1163    X\x{123}\x{123}\x{123}\x{123}\=ps
1164Partial match: X\x{123}\x{123}\x{123}\x{123}
1165
1166/X[^a]{2,4}?b/utf
1167    X\=ps
1168Partial match: X
1169    X\x{123}\=ps
1170Partial match: X\x{123}
1171    X\x{123}\x{123}\=ps
1172Partial match: X\x{123}\x{123}
1173    X\x{123}\x{123}\x{123}\=ps
1174Partial match: X\x{123}\x{123}\x{123}
1175    X\x{123}\x{123}\x{123}\x{123}\=ps
1176Partial match: X\x{123}\x{123}\x{123}\x{123}
1177
1178/X[^a]{2,4}+b/utf
1179    X\=ps
1180Partial match: X
1181    X\x{123}\=ps
1182Partial match: X\x{123}
1183    X\x{123}\x{123}\=ps
1184Partial match: X\x{123}\x{123}
1185    X\x{123}\x{123}\x{123}\=ps
1186Partial match: X\x{123}\x{123}\x{123}
1187    X\x{123}\x{123}\x{123}\x{123}\=ps
1188Partial match: X\x{123}\x{123}\x{123}\x{123}
1189
1190/(Y)X\1{2,4}b/utf
1191    YX\=ps
1192Partial match: YX
1193    YXY\=ps
1194Partial match: YXY
1195    YXYY\=ps
1196Partial match: YXYY
1197    YXYYY\=ps
1198Partial match: YXYYY
1199    YXYYYY\=ps
1200Partial match: YXYYYY
1201
1202/(Y)X\1{2,4}?b/utf
1203    YX\=ps
1204Partial match: YX
1205    YXY\=ps
1206Partial match: YXY
1207    YXYY\=ps
1208Partial match: YXYY
1209    YXYYY\=ps
1210Partial match: YXYYY
1211    YXYYYY\=ps
1212Partial match: YXYYYY
1213
1214/(Y)X\1{2,4}+b/utf
1215    YX\=ps
1216Partial match: YX
1217    YXY\=ps
1218Partial match: YXY
1219    YXYY\=ps
1220Partial match: YXYY
1221    YXYYY\=ps
1222Partial match: YXYYY
1223    YXYYYY\=ps
1224Partial match: YXYYYY
1225
1226/(\x{123})X\1{2,4}b/utf
1227    \x{123}X\=ps
1228Partial match: \x{123}X
1229    \x{123}X\x{123}\=ps
1230Partial match: \x{123}X\x{123}
1231    \x{123}X\x{123}\x{123}\=ps
1232Partial match: \x{123}X\x{123}\x{123}
1233    \x{123}X\x{123}\x{123}\x{123}\=ps
1234Partial match: \x{123}X\x{123}\x{123}\x{123}
1235    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1236Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1237
1238/(\x{123})X\1{2,4}?b/utf
1239    \x{123}X\=ps
1240Partial match: \x{123}X
1241    \x{123}X\x{123}\=ps
1242Partial match: \x{123}X\x{123}
1243    \x{123}X\x{123}\x{123}\=ps
1244Partial match: \x{123}X\x{123}\x{123}
1245    \x{123}X\x{123}\x{123}\x{123}\=ps
1246Partial match: \x{123}X\x{123}\x{123}\x{123}
1247    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1248Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1249
1250/(\x{123})X\1{2,4}+b/utf
1251    \x{123}X\=ps
1252Partial match: \x{123}X
1253    \x{123}X\x{123}\=ps
1254Partial match: \x{123}X\x{123}
1255    \x{123}X\x{123}\x{123}\=ps
1256Partial match: \x{123}X\x{123}\x{123}
1257    \x{123}X\x{123}\x{123}\x{123}\=ps
1258Partial match: \x{123}X\x{123}\x{123}\x{123}
1259    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1260Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1261
1262/\bthe cat\b/utf
1263    the cat\=ps
1264 0: the cat
1265    the cat\=ph
1266Partial match: the cat
1267
1268/abcd*/utf
1269    xxxxabcd\=ps
1270 0: abcd
1271    xxxxabcd\=ph
1272Partial match: abcd
1273
1274/abcd*/i,utf
1275    xxxxabcd\=ps
1276 0: abcd
1277    xxxxabcd\=ph
1278Partial match: abcd
1279    XXXXABCD\=ps
1280 0: ABCD
1281    XXXXABCD\=ph
1282Partial match: ABCD
1283
1284/abc\d*/utf
1285    xxxxabc1\=ps
1286 0: abc1
1287    xxxxabc1\=ph
1288Partial match: abc1
1289
1290/(a)bc\1*/utf
1291    xxxxabca\=ps
1292 0: abca
1293 1: a
1294    xxxxabca\=ph
1295Partial match: abca
1296
1297/abc[de]*/utf
1298    xxxxabcde\=ps
1299 0: abcde
1300    xxxxabcde\=ph
1301Partial match: abcde
1302
1303/X\W{3}X/utf
1304    X\=ps
1305Partial match: X
1306
1307/\sxxx\s/utf,tables=2
1308    AB\x{85}xxx\x{a0}XYZ
1309 0: \x{85}xxx\x{a0}
1310    AB\x{a0}xxx\x{85}XYZ
1311 0: \x{a0}xxx\x{85}
1312
1313/\S \S/utf,tables=2
1314    \x{a2} \x{84}
1315 0: \x{a2} \x{84}
1316
1317'A#хц'Bx,newline=any,utf
1318------------------------------------------------------------------
1319        Bra
1320        A
1321        Ket
1322        End
1323------------------------------------------------------------------
1324
1325'A#хц
1326  PQ'Bx,newline=any,utf
1327------------------------------------------------------------------
1328        Bra
1329        APQ
1330        Ket
1331        End
1332------------------------------------------------------------------
1333
1334/a+#хaa
1335  z#XX?/Bx,newline=any,utf
1336------------------------------------------------------------------
1337        Bra
1338        a++
1339        z
1340        Ket
1341        End
1342------------------------------------------------------------------
1343
1344/a+#хaa
1345  z#х?/Bx,newline=any,utf
1346------------------------------------------------------------------
1347        Bra
1348        a++
1349        z
1350        Ket
1351        End
1352------------------------------------------------------------------
1353
1354/\g{A}xxx#bXX(?'A'123)
1355(?'A'456)/Bx,newline=any,utf
1356------------------------------------------------------------------
1357        Bra
1358        \1
1359        xxx
1360        CBra 1
1361        456
1362        Ket
1363        Ket
1364        End
1365------------------------------------------------------------------
1366
1367/\g{A}xxx#bх(?'A'123)
1368(?'A'456)/Bx,newline=any,utf
1369------------------------------------------------------------------
1370        Bra
1371        \1
1372        xxx
1373        CBra 1
1374        456
1375        Ket
1376        Ket
1377        End
1378------------------------------------------------------------------
1379
1380/^\cģ/utf
1381Failed: error 168 at offset 3: \c must be followed by a printable ASCII character
1382
1383/(\R*)(.)/s,utf
1384    \r\n
1385 0: \x{0d}
1386 1:
1387 2: \x{0d}
1388    \r\r\n\n\r
1389 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1390 1: \x{0d}\x{0d}\x{0a}\x{0a}
1391 2: \x{0d}
1392    \r\r\n\n\r\n
1393 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1394 1: \x{0d}\x{0d}\x{0a}\x{0a}
1395 2: \x{0d}
1396
1397/(\R)*(.)/s,utf
1398    \r\n
1399 0: \x{0d}
1400 1: <unset>
1401 2: \x{0d}
1402    \r\r\n\n\r
1403 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1404 1: \x{0a}
1405 2: \x{0d}
1406    \r\r\n\n\r\n
1407 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1408 1: \x{0a}
1409 2: \x{0d}
1410
1411/[^\x{1234}]+/Ii,utf
1412Capture group count = 0
1413Options: caseless utf
1414Subject length lower bound = 1
1415
1416/[^\x{1234}]+?/Ii,utf
1417Capture group count = 0
1418Options: caseless utf
1419Subject length lower bound = 1
1420
1421/[^\x{1234}]++/Ii,utf
1422Capture group count = 0
1423Options: caseless utf
1424Subject length lower bound = 1
1425
1426/[^\x{1234}]{2}/Ii,utf
1427Capture group count = 0
1428Options: caseless utf
1429Subject length lower bound = 2
1430
1431/f.*/
1432    for\=ph
1433Partial match: for
1434
1435/f.*/s
1436    for\=ph
1437Partial match: for
1438
1439/f.*/utf
1440    for\=ph
1441Partial match: for
1442
1443/f.*/s,utf
1444    for\=ph
1445Partial match: for
1446
1447/\x{d7ff}\x{e000}/utf
1448
1449/\x{d800}/utf
1450Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1451
1452/\x{dfff}/utf
1453Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1454
1455/\h+/utf
1456    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1457 0: \x{1680}\x{2000}\x{202f}\x{3000}
1458    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1459 0: \x{200a}\x{a0}\x{2000}
1460
1461/[\h\x{e000}]+/B,utf
1462------------------------------------------------------------------
1463        Bra
1464        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]++
1465        Ket
1466        End
1467------------------------------------------------------------------
1468    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1469 0: \x{1680}\x{2000}\x{202f}\x{3000}
1470    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1471 0: \x{200a}\x{a0}\x{2000}
1472
1473/\H+/utf
1474    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1475 0: \x{167f}\x{1681}\x{180d}\x{180f}
1476    \x{2000}\x{200a}\x{1fff}\x{200b}
1477 0: \x{1fff}\x{200b}
1478    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1479 0: \x{202e}\x{2030}\x{205e}\x{2060}
1480    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1481 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1482
1483/[\H\x{d7ff}]+/B,utf
1484------------------------------------------------------------------
1485        Bra
1486        [\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}]++
1487        Ket
1488        End
1489------------------------------------------------------------------
1490    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1491 0: \x{167f}\x{1681}\x{180d}\x{180f}
1492    \x{2000}\x{200a}\x{1fff}\x{200b}
1493 0: \x{1fff}\x{200b}
1494    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1495 0: \x{202e}\x{2030}\x{205e}\x{2060}
1496    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1497 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1498
1499/\v+/utf
1500    \x{2027}\x{2030}\x{2028}\x{2029}
1501 0: \x{2028}\x{2029}
1502    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1503 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1504
1505/[\v\x{e000}]+/B,utf
1506------------------------------------------------------------------
1507        Bra
1508        [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]++
1509        Ket
1510        End
1511------------------------------------------------------------------
1512    \x{2027}\x{2030}\x{2028}\x{2029}
1513 0: \x{2028}\x{2029}
1514    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1515 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1516
1517/\V+/utf
1518    \x{2028}\x{2029}\x{2027}\x{2030}
1519 0: \x{2027}\x{2030}
1520    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1521 0: \x{09}\x{0e}\x{84}\x{86}
1522
1523/[\V\x{d7ff}]+/B,utf
1524------------------------------------------------------------------
1525        Bra
1526        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]++
1527        Ket
1528        End
1529------------------------------------------------------------------
1530    \x{2028}\x{2029}\x{2027}\x{2030}
1531 0: \x{2027}\x{2030}
1532    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1533 0: \x{09}\x{0e}\x{84}\x{86}
1534
1535/\R+/bsr=unicode,utf
1536    \x{2027}\x{2030}\x{2028}\x{2029}
1537 0: \x{2028}\x{2029}
1538    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1539 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1540
1541/(..)\1/utf
1542    ab\=ps
1543Partial match: ab
1544    aba\=ps
1545Partial match: aba
1546    abab\=ps
1547 0: abab
1548 1: ab
1549
1550/(..)\1/i,utf
1551    ab\=ps
1552Partial match: ab
1553    abA\=ps
1554Partial match: abA
1555    aBAb\=ps
1556 0: aBAb
1557 1: aB
1558
1559/(..)\1{2,}/utf
1560    ab\=ps
1561Partial match: ab
1562    aba\=ps
1563Partial match: aba
1564    abab\=ps
1565Partial match: abab
1566    ababa\=ps
1567Partial match: ababa
1568    ababab\=ps
1569 0: ababab
1570 1: ab
1571    ababab\=ph
1572Partial match: ababab
1573    abababa\=ps
1574 0: ababab
1575 1: ab
1576    abababa\=ph
1577Partial match: abababa
1578
1579/(..)\1{2,}/i,utf
1580    ab\=ps
1581Partial match: ab
1582    aBa\=ps
1583Partial match: aBa
1584    aBAb\=ps
1585Partial match: aBAb
1586    AbaBA\=ps
1587Partial match: AbaBA
1588    abABAb\=ps
1589 0: abABAb
1590 1: ab
1591    aBAbaB\=ph
1592Partial match: aBAbaB
1593    abABabA\=ps
1594 0: abABab
1595 1: ab
1596    abaBABa\=ph
1597Partial match: abaBABa
1598
1599/(..)\1{2,}?x/i,utf
1600    ab\=ps
1601Partial match: ab
1602    abA\=ps
1603Partial match: abA
1604    aBAb\=ps
1605Partial match: aBAb
1606    abaBA\=ps
1607Partial match: abaBA
1608    abAbaB\=ps
1609Partial match: abAbaB
1610    abaBabA\=ps
1611Partial match: abaBabA
1612    abAbABaBx\=ps
1613 0: abAbABaBx
1614 1: ab
1615
1616/./utf,newline=crlf
1617    \r\=ps
1618 0: \x{0d}
1619    \r\=ph
1620Partial match: \x{0d}
1621
1622/.{2,3}/utf,newline=crlf
1623    \r\=ps
1624Partial match: \x{0d}
1625    \r\=ph
1626Partial match: \x{0d}
1627    \r\r\=ps
1628 0: \x{0d}\x{0d}
1629    \r\r\=ph
1630Partial match: \x{0d}\x{0d}
1631    \r\r\r\=ps
1632 0: \x{0d}\x{0d}\x{0d}
1633    \r\r\r\=ph
1634Partial match: \x{0d}\x{0d}\x{0d}
1635
1636/.{2,3}?/utf,newline=crlf
1637    \r\=ps
1638Partial match: \x{0d}
1639    \r\=ph
1640Partial match: \x{0d}
1641    \r\r\=ps
1642 0: \x{0d}\x{0d}
1643    \r\r\=ph
1644Partial match: \x{0d}\x{0d}
1645    \r\r\r\=ps
1646 0: \x{0d}\x{0d}
1647    \r\r\r\=ph
1648 0: \x{0d}\x{0d}
1649
1650/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/B,utf
1651------------------------------------------------------------------
1652        Bra
1653        [^\x{100}]
1654        [^\x{1234}]
1655        [^\x{ffff}]
1656        [^\x{10000}]
1657        [^\x{10ffff}]
1658        Ket
1659        End
1660------------------------------------------------------------------
1661
1662/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/Bi,utf
1663------------------------------------------------------------------
1664        Bra
1665     /i [^\x{100}]
1666     /i [^\x{1234}]
1667     /i [^\x{ffff}]
1668     /i [^\x{10000}]
1669     /i [^\x{10ffff}]
1670        Ket
1671        End
1672------------------------------------------------------------------
1673
1674/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/B,utf
1675------------------------------------------------------------------
1676        Bra
1677        [^\x{100}]*
1678        [^\x{10000}]+
1679        [^\x{10ffff}]??
1680        [^\x{8000}]{4}
1681        [^\x{8000}]*
1682        [^\x{7fff}]{2}
1683        [^\x{7fff}]{0,7}?
1684        [^\x{fffff}]{5}
1685        [^\x{fffff}]?+
1686        Ket
1687        End
1688------------------------------------------------------------------
1689
1690/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/Bi,utf
1691------------------------------------------------------------------
1692        Bra
1693     /i [^\x{100}]*
1694     /i [^\x{10000}]+
1695     /i [^\x{10ffff}]??
1696     /i [^\x{8000}]{4}
1697     /i [^\x{8000}]*
1698     /i [^\x{7fff}]{2}
1699     /i [^\x{7fff}]{0,7}?
1700     /i [^\x{fffff}]{5}
1701     /i [^\x{fffff}]?+
1702        Ket
1703        End
1704------------------------------------------------------------------
1705
1706/(?<=\x{1234}\x{1234})\bxy/I,utf
1707Capture group count = 0
1708Max lookbehind = 2
1709Options: utf
1710First code unit = 'x'
1711Last code unit = 'y'
1712Subject length lower bound = 2
1713
1714/(?<!^)ETA/utf
1715\= Expect no match
1716    ETA
1717No match
1718
1719/\u0100/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1720------------------------------------------------------------------
1721        Bra
1722        \x{100}
1723        Ket
1724        End
1725------------------------------------------------------------------
1726
1727/[\u0100-\u0200]/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1728------------------------------------------------------------------
1729        Bra
1730        [\x{100}-\x{200}]
1731        Ket
1732        End
1733------------------------------------------------------------------
1734
1735/\ud800/utf,alt_bsux,allow_empty_class,match_unset_backref
1736Failed: error 173 at offset 6: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1737
1738/^\u{0000000000010ffff}/utf,extra_alt_bsux
1739    \x{10ffff}
1740 0: \x{10ffff}
1741
1742/\u{ 1bb1}/utf,extra_alt_bsux
1743    u{ 1bb1}
1744 0: u{ 1bb1}
1745\= Expect no match
1746    \x{1bb1}
1747No match
1748
1749/\u/utf,alt_bsux
1750    \\u
1751 0: u
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------------------------------------------------------------------
1787Capture group count = 0
1788Subject length lower bound = 1
1789
1790/[\p{^L}]/IB
1791------------------------------------------------------------------
1792        Bra
1793        [\P{L}]
1794        Ket
1795        End
1796------------------------------------------------------------------
1797Capture group count = 0
1798Subject length lower bound = 1
1799
1800/[\P{L}]/IB
1801------------------------------------------------------------------
1802        Bra
1803        [\P{L}]
1804        Ket
1805        End
1806------------------------------------------------------------------
1807Capture group count = 0
1808Subject length lower bound = 1
1809
1810/[\P{^L}]/IB
1811------------------------------------------------------------------
1812        Bra
1813        [\p{L}]
1814        Ket
1815        End
1816------------------------------------------------------------------
1817Capture group 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------------------------------------------------------------------
1827Capture group 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------------------------------------------------------------------
1838Capture group 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------------------------------------------------------------------
1851Capture group 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{482}AB
2350 0: !.+\x{19}\x{482}
2351
2352/^[\p{^Xwd}]+/utf
2353    !.+\x{019}\x{589}AB
2354 0: !.+\x{19}\x{589}
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{1735}B
2404 0: \x{1735}
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{1735}B
2464 0: \x{1735}
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/[[:digit:]]/B,ucp,ascii_digit
2533------------------------------------------------------------------
2534        Bra
2535        [0-9]
2536        Ket
2537        End
2538------------------------------------------------------------------
2539
2540/[[:graph:]]/B,ucp
2541------------------------------------------------------------------
2542        Bra
2543        [[:graph:]]
2544        Ket
2545        End
2546------------------------------------------------------------------
2547
2548/[[:print:]]/B,ucp
2549------------------------------------------------------------------
2550        Bra
2551        [[:print:]]
2552        Ket
2553        End
2554------------------------------------------------------------------
2555
2556/[[:punct:]]/B,ucp
2557------------------------------------------------------------------
2558        Bra
2559        [[:punct:]]
2560        Ket
2561        End
2562------------------------------------------------------------------
2563
2564/[[:space:]]/B,ucp
2565------------------------------------------------------------------
2566        Bra
2567        [\p{Xps}]
2568        Ket
2569        End
2570------------------------------------------------------------------
2571
2572/[[:word:]]/B,ucp
2573------------------------------------------------------------------
2574        Bra
2575        [\p{Xwd}]
2576        Ket
2577        End
2578------------------------------------------------------------------
2579
2580/[[:xdigit:]]/B,ucp
2581------------------------------------------------------------------
2582        Bra
2583        [[:xdigit:]]
2584        Ket
2585        End
2586------------------------------------------------------------------
2587
2588/[[:xdigit:]]/B,ucp,ascii_digit
2589------------------------------------------------------------------
2590        Bra
2591        [0-9A-Fa-f]
2592        Ket
2593        End
2594------------------------------------------------------------------
2595
2596# Unicode properties for \b and \B
2597
2598/\b...\B/utf,ucp
2599    abc_
2600 0: abc
2601    \x{37e}abc\x{376}
2602 0: abc
2603    \x{37e}\x{376}\x{371}\x{393}\x{394}
2604 0: \x{376}\x{371}\x{393}
2605    !\x{c0}++\x{c1}\x{c2}
2606 0: ++\x{c1}
2607    !\x{c0}+++++
2608 0: \x{c0}++
2609
2610# Without PCRE_UCP, non-ASCII always fail, even if < 256
2611
2612/\b...\B/utf
2613    abc_
2614 0: abc
2615\= Expect no match
2616    \x{37e}abc\x{376}
2617No match
2618    \x{37e}\x{376}\x{371}\x{393}\x{394}
2619No match
2620    !\x{c0}++\x{c1}\x{c2}
2621No match
2622    !\x{c0}+++++
2623No match
2624
2625# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
2626
2627/\b...\B/ucp
2628    abc_
2629 0: abc
2630    !\x{c0}++\x{c1}\x{c2}
2631 0: ++\xc1
2632    !\x{c0}+++++
2633 0: \xc0++
2634
2635# Some of these are silly, but they check various combinations
2636
2637/[[:^alpha:][:^cntrl:]]+/B,utf,ucp
2638------------------------------------------------------------------
2639        Bra
2640        [\P{L}\P{Cc}]++
2641        Ket
2642        End
2643------------------------------------------------------------------
2644    123
2645 0: 123
2646    abc
2647 0: abc
2648
2649/[[:^cntrl:][:^alpha:]]+/B,utf,ucp
2650------------------------------------------------------------------
2651        Bra
2652        [\P{Cc}\P{L}]++
2653        Ket
2654        End
2655------------------------------------------------------------------
2656    123
2657 0: 123
2658    abc
2659 0: abc
2660
2661/[[:alpha:]]+/B,utf,ucp
2662------------------------------------------------------------------
2663        Bra
2664        [\p{L}]++
2665        Ket
2666        End
2667------------------------------------------------------------------
2668    abc
2669 0: abc
2670
2671/[[:^alpha:]\S]+/B,utf,ucp
2672------------------------------------------------------------------
2673        Bra
2674        [\P{L}\P{Xsp}]++
2675        Ket
2676        End
2677------------------------------------------------------------------
2678    123
2679 0: 123
2680    abc
2681 0: abc
2682
2683/[^\d]+/B,utf,ucp
2684------------------------------------------------------------------
2685        Bra
2686        [^\p{Nd}]++
2687        Ket
2688        End
2689------------------------------------------------------------------
2690    abc123
2691 0: abc
2692    abc\x{123}
2693 0: abc\x{123}
2694    \x{660}abc
2695 0: abc
2696
2697/\p{Lu}+9\p{Lu}+B\p{Lu}+b/B
2698------------------------------------------------------------------
2699        Bra
2700        prop Lu ++
2701        9
2702        prop Lu +
2703        B
2704        prop Lu ++
2705        b
2706        Ket
2707        End
2708------------------------------------------------------------------
2709
2710/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/B
2711------------------------------------------------------------------
2712        Bra
2713        notprop Lu +
2714        9
2715        notprop Lu ++
2716        B
2717        notprop Lu +
2718        b
2719        Ket
2720        End
2721------------------------------------------------------------------
2722
2723/\P{Lu}+9\P{Lu}+B\P{Lu}+b/B
2724------------------------------------------------------------------
2725        Bra
2726        notprop Lu +
2727        9
2728        notprop Lu ++
2729        B
2730        notprop Lu +
2731        b
2732        Ket
2733        End
2734------------------------------------------------------------------
2735
2736/\p{Han}+X\p{Greek}+\x{370}/B,utf
2737------------------------------------------------------------------
2738        Bra
2739        prop Han ++
2740        X
2741        prop Greek +
2742        \x{370}
2743        Ket
2744        End
2745------------------------------------------------------------------
2746
2747/\p{Xan}+!\p{Xan}+A/B
2748------------------------------------------------------------------
2749        Bra
2750        prop Xan ++
2751        !
2752        prop Xan +
2753        A
2754        Ket
2755        End
2756------------------------------------------------------------------
2757
2758/\p{Xsp}+!\p{Xsp}\t/B
2759------------------------------------------------------------------
2760        Bra
2761        prop Xsp ++
2762        !
2763        prop Xsp
2764        \x09
2765        Ket
2766        End
2767------------------------------------------------------------------
2768
2769/\p{Xps}+!\p{Xps}\t/B
2770------------------------------------------------------------------
2771        Bra
2772        prop Xps ++
2773        !
2774        prop Xps
2775        \x09
2776        Ket
2777        End
2778------------------------------------------------------------------
2779
2780/\p{Xwd}+!\p{Xwd}_/B
2781------------------------------------------------------------------
2782        Bra
2783        prop Xwd ++
2784        !
2785        prop Xwd
2786        _
2787        Ket
2788        End
2789------------------------------------------------------------------
2790
2791/A+\p{N}A+\dB+\p{N}*B+\d*/B,ucp
2792------------------------------------------------------------------
2793        Bra
2794        A++
2795        prop N
2796        A++
2797        prop Nd
2798        B+
2799        prop N *+
2800        B++
2801        prop Nd *+
2802        Ket
2803        End
2804------------------------------------------------------------------
2805
2806# These behaved oddly in Perl, so they are kept in this test
2807
2808/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2809\= Expect no match
2810    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2811No match
2812
2813/(ȺȺȺ)?\1/i,utf
2814\= Expect no match
2815    ȺȺȺⱥⱥ
2816No match
2817
2818/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2819    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2820 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2821 1: \x{23a}\x{23a}\x{23a}
2822
2823/(ȺȺȺ)?\1/i,utf
2824    ȺȺȺⱥⱥⱥ
2825 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2826 1: \x{23a}\x{23a}\x{23a}
2827
2828/(\x{23a}\x{23a}\x{23a})\1/i,utf
2829\= Expect no match
2830    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2831No match
2832
2833/(ȺȺȺ)\1/i,utf
2834\= Expect no match
2835    ȺȺȺⱥⱥ
2836No match
2837
2838/(\x{23a}\x{23a}\x{23a})\1/i,utf
2839    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2840 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2841 1: \x{23a}\x{23a}\x{23a}
2842
2843/(ȺȺȺ)\1/i,utf
2844    ȺȺȺⱥⱥⱥ
2845 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2846 1: \x{23a}\x{23a}\x{23a}
2847
2848/(\x{2c65}\x{2c65})\1/i,utf
2849    \x{2c65}\x{2c65}\x{23a}\x{23a}
2850 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2851 1: \x{2c65}\x{2c65}
2852
2853/(ⱥⱥ)\1/i,utf
2854    ⱥⱥȺȺ
2855 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2856 1: \x{2c65}\x{2c65}
2857
2858/(\x{23a}\x{23a}\x{23a})\1Y/i,utf
2859    X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
2860 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
2861 1: \x{23a}\x{23a}\x{23a}
2862
2863/(\x{2c65}\x{2c65})\1Y/i,utf
2864    X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
2865 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
2866 1: \x{2c65}\x{2c65}
2867
2868# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
2869
2870/^[\p{Batak}]/utf
2871    \x{1bc0}
2872 0: \x{1bc0}
2873    \x{1bff}
2874 0: \x{1bff}
2875\= Expect no match
2876    \x{1bf4}
2877No match
2878
2879/^[\p{Brahmi}]/utf
2880    \x{11000}
2881 0: \x{11000}
2882    \x{1106f}
2883 0: \x{1106f}
2884\= Expect no match
2885    \x{1104e}
2886No match
2887
2888/^[\p{Mandaic}]/utf
2889    \x{840}
2890 0: \x{840}
2891    \x{85e}
2892 0: \x{85e}
2893\= Expect no match
2894    \x{85c}
2895No match
2896    \x{85d}
2897No match
2898
2899/(\X*)(.)/s,utf
2900    A\x{300}
2901 0: A
2902 1:
2903 2: A
2904
2905/^S(\X*)e(\X*)$/utf
2906    Stéréo
2907 0: Ste\x{301}re\x{301}o
2908 1: te\x{301}r
2909 2: \x{301}o
2910
2911/^\X/utf
2912    ́réo
2913 0: \x{301}
2914
2915/^a\X41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
2916    aX41z
2917 0: aX41z
2918\= Expect no match
2919    aAz
2920No match
2921
2922/\X/
2923    a\=ps
2924 0: a
2925    a\=ph
2926Partial match: a
2927
2928/\Xa/
2929    aa\=ps
2930 0: aa
2931    aa\=ph
2932 0: aa
2933
2934/\X{2}/
2935    aa\=ps
2936 0: aa
2937    aa\=ph
2938Partial match: aa
2939
2940/\X+a/
2941    a\=ps
2942Partial match: a
2943    aa\=ps
2944 0: aa
2945    aa\=ph
2946Partial match: aa
2947
2948/\X+?a/
2949    a\=ps
2950Partial match: a
2951    ab\=ps
2952Partial match: ab
2953    aa\=ps
2954 0: aa
2955    aa\=ph
2956 0: aa
2957    aba\=ps
2958 0: aba
2959
2960# These Unicode 6.1.0 scripts are not known to Perl.
2961
2962/\p{Chakma}\d/utf,ucp
2963    \x{11100}\x{1113c}
2964 0: \x{11100}\x{1113c}
2965
2966/\p{Takri}\d/utf,ucp
2967    \x{11680}\x{116c0}
2968 0: \x{11680}\x{116c0}
2969
2970/^\X/utf
2971    A\=ps
2972 0: A
2973    A\=ph
2974Partial match: A
2975    A\x{300}\x{301}\=ps
2976 0: A\x{300}\x{301}
2977    A\x{300}\x{301}\=ph
2978Partial match: A\x{300}\x{301}
2979    A\x{301}\=ps
2980 0: A\x{301}
2981    A\x{301}\=ph
2982Partial match: A\x{301}
2983
2984/^\X{2,3}/utf
2985    A\=ps
2986Partial match: A
2987    A\=ph
2988Partial match: A
2989    AA\=ps
2990 0: AA
2991    AA\=ph
2992Partial match: AA
2993    A\x{300}\x{301}\=ps
2994Partial match: A\x{300}\x{301}
2995    A\x{300}\x{301}\=ph
2996Partial match: A\x{300}\x{301}
2997    A\x{300}\x{301}A\x{300}\x{301}\=ps
2998 0: A\x{300}\x{301}A\x{300}\x{301}
2999    A\x{300}\x{301}A\x{300}\x{301}\=ph
3000Partial match: A\x{300}\x{301}A\x{300}\x{301}
3001
3002/^\X{2}/utf
3003    AA\=ps
3004 0: AA
3005    AA\=ph
3006Partial match: AA
3007    A\x{300}\x{301}A\x{300}\x{301}\=ps
3008 0: A\x{300}\x{301}A\x{300}\x{301}
3009    A\x{300}\x{301}A\x{300}\x{301}\=ph
3010Partial match: A\x{300}\x{301}A\x{300}\x{301}
3011
3012/^\X+/utf
3013    AA\=ps
3014 0: AA
3015    AA\=ph
3016Partial match: AA
3017
3018/^\X+?Z/utf
3019    AA\=ps
3020Partial match: AA
3021    AA\=ph
3022Partial match: AA
3023
3024/A\x{3a3}B/IBi,utf
3025------------------------------------------------------------------
3026        Bra
3027     /i A
3028        clist 03a3 03c2 03c3
3029     /i B
3030        Ket
3031        End
3032------------------------------------------------------------------
3033Capture group count = 0
3034Options: caseless utf
3035First code unit = 'A' (caseless)
3036Last code unit = 'B' (caseless)
3037Subject length lower bound = 3
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/[\x{3a3}]+/Bi,utf
3056------------------------------------------------------------------
3057        Bra
3058        clist 03a3 03c2 03c3 ++
3059        Ket
3060        End
3061------------------------------------------------------------------
3062
3063/[^\x{3a3}]+/Bi,utf
3064------------------------------------------------------------------
3065        Bra
3066        not clist 03a3 03c2 03c3 ++
3067        Ket
3068        End
3069------------------------------------------------------------------
3070
3071/a*\x{3a3}/Bi,utf
3072------------------------------------------------------------------
3073        Bra
3074     /i a*+
3075        clist 03a3 03c2 03c3
3076        Ket
3077        End
3078------------------------------------------------------------------
3079
3080/\x{3a3}+a/Bi,utf
3081------------------------------------------------------------------
3082        Bra
3083        clist 03a3 03c2 03c3 ++
3084     /i a
3085        Ket
3086        End
3087------------------------------------------------------------------
3088
3089/\x{3a3}*\x{3c2}/Bi,utf
3090------------------------------------------------------------------
3091        Bra
3092        clist 03a3 03c2 03c3 *
3093        clist 03a3 03c2 03c3
3094        Ket
3095        End
3096------------------------------------------------------------------
3097
3098/\x{3a3}{3}/i,utf,aftertext
3099    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3100 0: \x{3a3}\x{3c3}\x{3c2}
3101 0+ \x{3a3}\x{3c3}\x{3c2}
3102
3103/\x{3a3}{2,4}/i,utf,aftertext
3104    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3105 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}
3106 0+ \x{3c3}\x{3c2}
3107
3108/\x{3a3}{2,4}?/i,utf,aftertext
3109    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3110 0: \x{3a3}\x{3c3}
3111 0+ \x{3c2}\x{3a3}\x{3c3}\x{3c2}
3112
3113/\x{3a3}+./i,utf,aftertext
3114    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3115 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3116 0+
3117
3118/\x{3a3}++./i,utf,aftertext
3119\= Expect no match
3120    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3121No match
3122
3123/\x{3a3}*\x{3c2}/Bi,utf
3124------------------------------------------------------------------
3125        Bra
3126        clist 03a3 03c2 03c3 *
3127        clist 03a3 03c2 03c3
3128        Ket
3129        End
3130------------------------------------------------------------------
3131
3132/[^\x{3a3}]*\x{3c2}/Bi,utf
3133------------------------------------------------------------------
3134        Bra
3135        not clist 03a3 03c2 03c3 *+
3136        clist 03a3 03c2 03c3
3137        Ket
3138        End
3139------------------------------------------------------------------
3140
3141/[^a]*\x{3c2}/Bi,utf
3142------------------------------------------------------------------
3143        Bra
3144     /i [^a]*
3145        clist 03a3 03c2 03c3
3146        Ket
3147        End
3148------------------------------------------------------------------
3149
3150/ist/Bi,utf
3151------------------------------------------------------------------
3152        Bra
3153     /i i
3154        clist 0053 0073 017f
3155     /i t
3156        Ket
3157        End
3158------------------------------------------------------------------
3159\= Expect no match
3160    ikt
3161No match
3162
3163/is+t/i,utf
3164    iSs\x{17f}t
3165 0: iSs\x{17f}t
3166\= Expect no match
3167    ikt
3168No match
3169
3170/is+?t/i,utf
3171\= Expect no match
3172    ikt
3173No match
3174
3175/is?t/i,utf
3176\= Expect no match
3177    ikt
3178No match
3179
3180/is{2}t/i,utf
3181\= Expect no match
3182    iskt
3183No match
3184
3185# This property is a PCRE special
3186
3187/^\p{Xuc}/utf
3188    $abc
3189 0: $
3190    @abc
3191 0: @
3192    `abc
3193 0: `
3194    \x{1234}abc
3195 0: \x{1234}
3196\= Expect no match
3197    abc
3198No match
3199
3200/^\p{Xuc}+/utf
3201    $@`\x{a0}\x{1234}\x{e000}**
3202 0: $@`\x{a0}\x{1234}\x{e000}
3203\= Expect no match
3204    \x{9f}
3205No match
3206
3207/^\p{Xuc}+?/utf
3208    $@`\x{a0}\x{1234}\x{e000}**
3209 0: $
3210\= Expect no match
3211    \x{9f}
3212No match
3213
3214/^\p{Xuc}+?\*/utf
3215    $@`\x{a0}\x{1234}\x{e000}**
3216 0: $@`\x{a0}\x{1234}\x{e000}*
3217\= Expect no match
3218    \x{9f}
3219No match
3220
3221/^\p{Xuc}++/utf
3222    $@`\x{a0}\x{1234}\x{e000}**
3223 0: $@`\x{a0}\x{1234}\x{e000}
3224\= Expect no match
3225    \x{9f}
3226No match
3227
3228/^\p{Xuc}{3,5}/utf
3229    $@`\x{a0}\x{1234}\x{e000}**
3230 0: $@`\x{a0}\x{1234}
3231\= Expect no match
3232    \x{9f}
3233No match
3234
3235/^\p{Xuc}{3,5}?/utf
3236    $@`\x{a0}\x{1234}\x{e000}**
3237 0: $@`
3238\= Expect no match
3239    \x{9f}
3240No match
3241
3242/^[\p{Xuc}]/utf
3243    $@`\x{a0}\x{1234}\x{e000}**
3244 0: $
3245\= Expect no match
3246    \x{9f}
3247No match
3248
3249/^[\p{Xuc}]+/utf
3250    $@`\x{a0}\x{1234}\x{e000}**
3251 0: $@`\x{a0}\x{1234}\x{e000}
3252\= Expect no match
3253    \x{9f}
3254No match
3255
3256/^\P{Xuc}/utf
3257    abc
3258 0: a
3259\= Expect no match
3260    $abc
3261No match
3262    @abc
3263No match
3264    `abc
3265No match
3266    \x{1234}abc
3267No match
3268
3269/^[\P{Xuc}]/utf
3270    abc
3271 0: a
3272\= Expect no match
3273    $abc
3274No match
3275    @abc
3276No match
3277    `abc
3278No match
3279    \x{1234}abc
3280No match
3281
3282# Some auto-possessification tests
3283
3284/\pN+\z/B
3285------------------------------------------------------------------
3286        Bra
3287        prop N ++
3288        \z
3289        Ket
3290        End
3291------------------------------------------------------------------
3292
3293/\PN+\z/B
3294------------------------------------------------------------------
3295        Bra
3296        notprop N ++
3297        \z
3298        Ket
3299        End
3300------------------------------------------------------------------
3301
3302/\pN+/B
3303------------------------------------------------------------------
3304        Bra
3305        prop N ++
3306        Ket
3307        End
3308------------------------------------------------------------------
3309
3310/\PN+/B
3311------------------------------------------------------------------
3312        Bra
3313        notprop N ++
3314        Ket
3315        End
3316------------------------------------------------------------------
3317
3318/\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
3319------------------------------------------------------------------
3320        Bra
3321        AllAny+
3322        AllAny
3323        AllAny+
3324        notprop Any
3325        AllAny+
3326        prop Lc
3327        AllAny+
3328        prop L
3329        AllAny+
3330        prop Lu
3331        AllAny+
3332        prop Han
3333        AllAny+
3334        prop Xan
3335        AllAny+
3336        prop Xsp
3337        AllAny+
3338        prop Xps
3339        prop Xwd +
3340        AllAny
3341        AllAny+
3342        prop Xuc
3343        Ket
3344        End
3345------------------------------------------------------------------
3346
3347/\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
3348------------------------------------------------------------------
3349        Bra
3350        prop Lc +
3351        AllAny
3352        prop Lc +
3353        prop Lc
3354        notprop Lc ++
3355        prop Lc
3356        prop Lc +
3357        prop L
3358        prop Lc +
3359        prop Lu
3360        prop Lc +
3361        prop Han
3362        prop Lc +
3363        prop Xan
3364        prop Lc ++
3365        notprop Xan
3366        prop Lc ++
3367        prop Xsp
3368        prop Lc ++
3369        prop Xps
3370        prop Xwd +
3371        prop Lc
3372        prop Lc +
3373        prop Xuc
3374        Ket
3375        End
3376------------------------------------------------------------------
3377
3378/\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
3379------------------------------------------------------------------
3380        Bra
3381        prop N +
3382        AllAny
3383        prop N +
3384        prop Lc
3385        prop N ++
3386        prop L
3387        prop N +
3388        notprop L
3389        prop N ++
3390        notprop N
3391        prop N ++
3392        prop Lu
3393        prop N +
3394        prop Han
3395        prop N +
3396        prop Xan
3397        prop N ++
3398        prop Xsp
3399        prop N ++
3400        prop Xps
3401        prop Xwd +
3402        prop N
3403        prop N +
3404        prop Xuc
3405        Ket
3406        End
3407------------------------------------------------------------------
3408
3409/\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
3410------------------------------------------------------------------
3411        Bra
3412        prop Lu +
3413        AllAny
3414        prop Lu +
3415        prop Lc
3416        prop Lu +
3417        prop L
3418        prop Lu +
3419        prop Lu
3420        notprop Lu ++
3421        prop Lu
3422        prop Lu ++
3423        prop Nd
3424        prop Lu +
3425        notprop Nd
3426        prop Lu +
3427        prop Han
3428        prop Lu +
3429        prop Xan
3430        prop Lu ++
3431        prop Xsp
3432        prop Lu ++
3433        prop Xps
3434        prop Xwd +
3435        prop Lu
3436        prop Lu +
3437        prop Xuc
3438        Ket
3439        End
3440------------------------------------------------------------------
3441
3442/\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
3443------------------------------------------------------------------
3444        Bra
3445        prop Han +
3446        prop Lu
3447        prop Han +
3448        prop Lc
3449        prop Han +
3450        prop L
3451        prop Han +
3452        prop Lu
3453        prop Han ++
3454        prop Arabic
3455        prop Arabic +
3456        prop Arabic
3457        prop Han +
3458        prop Xan
3459        prop Han +
3460        prop Xsp
3461        prop Han +
3462        prop Xps
3463        prop Xwd +
3464        prop Han
3465        prop Han +
3466        prop Xuc
3467        Ket
3468        End
3469------------------------------------------------------------------
3470
3471/\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
3472------------------------------------------------------------------
3473        Bra
3474        prop Xan +
3475        AllAny
3476        prop Xan +
3477        prop Lc
3478        notprop Xan ++
3479        prop Lc
3480        prop Xan +
3481        prop L
3482        prop Xan +
3483        prop Lu
3484        prop Xan +
3485        prop Han
3486        prop Xan +
3487        prop Xan
3488        prop Xan ++
3489        notprop Xan
3490        prop Xan ++
3491        prop Xsp
3492        prop Xan ++
3493        prop Xps
3494        prop Xwd +
3495        prop Xan
3496        prop Xan +
3497        prop Xuc
3498        Ket
3499        End
3500------------------------------------------------------------------
3501
3502/\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
3503------------------------------------------------------------------
3504        Bra
3505        prop Xsp +
3506        AllAny
3507        prop Xsp ++
3508        prop Lc
3509        prop Xsp ++
3510        prop L
3511        prop Xsp ++
3512        prop Lu
3513        prop Xsp +
3514        prop Han
3515        prop Xsp ++
3516        prop Xan
3517        prop Xsp +
3518        prop Xsp
3519        notprop Xsp ++
3520        prop Xsp
3521        prop Xsp +
3522        prop Xps
3523        prop Xwd ++
3524        prop Xsp
3525        prop Xsp +
3526        prop Xuc
3527        Ket
3528        End
3529------------------------------------------------------------------
3530
3531/\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
3532------------------------------------------------------------------
3533        Bra
3534        prop Xwd +
3535        AllAny
3536        prop Xwd +
3537        prop Lc
3538        prop Xwd +
3539        prop L
3540        prop Xwd +
3541        prop Lu
3542        prop Xwd +
3543        prop Han
3544        prop Xwd +
3545        prop Xan
3546        prop Xwd ++
3547        prop Xsp
3548        prop Xwd ++
3549        prop Xps
3550        prop Xwd +
3551        prop Xwd
3552        prop Xwd ++
3553        notprop Xwd
3554        prop Xwd +
3555        prop Xuc
3556        Ket
3557        End
3558------------------------------------------------------------------
3559
3560/\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
3561------------------------------------------------------------------
3562        Bra
3563        prop Xuc +
3564        AllAny
3565        prop Xuc +
3566        prop Lc
3567        prop Xuc +
3568        prop L
3569        prop Xuc +
3570        prop Lu
3571        prop Xuc +
3572        prop Han
3573        prop Xuc +
3574        prop Xan
3575        prop Xuc +
3576        prop Xsp
3577        prop Xuc +
3578        prop Xps
3579        prop Xwd +
3580        prop Xuc
3581        prop Xuc +
3582        prop Xuc
3583        prop Xuc ++
3584        notprop Xuc
3585        Ket
3586        End
3587------------------------------------------------------------------
3588
3589/\p{N}+\p{Ll} \p{N}+\p{Nd} \p{N}+\P{Nd}/Bx,ucp
3590------------------------------------------------------------------
3591        Bra
3592        prop N ++
3593        prop Ll
3594        prop N +
3595        prop Nd
3596        prop N +
3597        notprop Nd
3598        Ket
3599        End
3600------------------------------------------------------------------
3601
3602/\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
3603------------------------------------------------------------------
3604        Bra
3605        prop Xan +
3606        prop L
3607        prop Xan +
3608        prop N
3609        prop Xan ++
3610        prop C
3611        prop Xan +
3612        notprop L
3613        notprop Xan ++
3614        prop N
3615        prop Xan +
3616        notprop C
3617        Ket
3618        End
3619------------------------------------------------------------------
3620
3621/\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
3622------------------------------------------------------------------
3623        Bra
3624        prop L +
3625        prop Xan
3626        prop N +
3627        prop Xan
3628        prop C ++
3629        prop Xan
3630        notprop L +
3631        prop Xan
3632        prop N +
3633        prop Xan
3634        notprop C +
3635        prop Xan
3636        prop L ++
3637        notprop Xan
3638        Ket
3639        End
3640------------------------------------------------------------------
3641
3642/\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
3643------------------------------------------------------------------
3644        Bra
3645        prop Xan +
3646        prop Lu
3647        prop Xan +
3648        prop Nd
3649        prop Xan ++
3650        prop Cc
3651        prop Xan +
3652        notprop Ll
3653        notprop Xan ++
3654        prop No
3655        prop Xan +
3656        notprop Cf
3657        Ket
3658        End
3659------------------------------------------------------------------
3660
3661/\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
3662------------------------------------------------------------------
3663        Bra
3664        prop Lu +
3665        prop Xan
3666        prop Nd +
3667        prop Xan
3668        prop Cs ++
3669        prop Xan
3670        notprop Lt +
3671        prop Xan
3672        prop Nl +
3673        prop Xan
3674        notprop Cc +
3675        prop Xan
3676        prop Lt ++
3677        notprop Xan
3678        Ket
3679        End
3680------------------------------------------------------------------
3681
3682/\w+\p{P} \w+\p{Po} \w+\s \p{Xan}+\s \s+\p{Xan} \s+\w/Bx,ucp
3683------------------------------------------------------------------
3684        Bra
3685        prop Xwd +
3686        prop P
3687        prop Xwd +
3688        prop Po
3689        prop Xwd ++
3690        prop Xsp
3691        prop Xan ++
3692        prop Xsp
3693        prop Xsp ++
3694        prop Xan
3695        prop Xsp ++
3696        prop Xwd
3697        Ket
3698        End
3699------------------------------------------------------------------
3700
3701/\w+\P{P} \W+\p{Po} \w+\S \P{Xan}+\s \s+\P{Xan} \s+\W/Bx,ucp
3702------------------------------------------------------------------
3703        Bra
3704        prop Xwd +
3705        notprop P
3706        notprop Xwd +
3707        prop Po
3708        prop Xwd +
3709        notprop Xsp
3710        notprop Xan +
3711        prop Xsp
3712        prop Xsp +
3713        notprop Xan
3714        prop Xsp +
3715        notprop Xwd
3716        Ket
3717        End
3718------------------------------------------------------------------
3719
3720/\w+\p{Po} \w+\p{Pc} \W+\p{Po} \W+\p{Pc} \w+\P{Po} \w+\P{Pc}/Bx,ucp
3721------------------------------------------------------------------
3722        Bra
3723        prop Xwd +
3724        prop Po
3725        prop Xwd ++
3726        prop Pc
3727        notprop Xwd +
3728        prop Po
3729        notprop Xwd +
3730        prop Pc
3731        prop Xwd +
3732        notprop Po
3733        prop Xwd +
3734        notprop Pc
3735        Ket
3736        End
3737------------------------------------------------------------------
3738
3739/\p{Nl}+\p{Xan} \P{Nl}+\p{Xan} \p{Nl}+\P{Xan} \P{Nl}+\P{Xan}/Bx,ucp
3740------------------------------------------------------------------
3741        Bra
3742        prop Nl +
3743        prop Xan
3744        notprop Nl +
3745        prop Xan
3746        prop Nl ++
3747        notprop Xan
3748        notprop Nl +
3749        notprop Xan
3750        Ket
3751        End
3752------------------------------------------------------------------
3753
3754/\p{Xan}+\p{Nl} \P{Xan}+\p{Nl} \p{Xan}+\P{Nl} \P{Xan}+\P{Nl}/Bx,ucp
3755------------------------------------------------------------------
3756        Bra
3757        prop Xan +
3758        prop Nl
3759        notprop Xan ++
3760        prop Nl
3761        prop Xan +
3762        notprop Nl
3763        notprop Xan +
3764        notprop Nl
3765        Ket
3766        End
3767------------------------------------------------------------------
3768
3769/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/Bx,ucp
3770------------------------------------------------------------------
3771        Bra
3772        prop Xan +
3773        prop Nd
3774        notprop Xan ++
3775        prop Nd
3776        prop Xan +
3777        notprop Nd
3778        notprop Xan +
3779        notprop Nd
3780        Ket
3781        End
3782------------------------------------------------------------------
3783
3784# End auto-possessification tests
3785
3786/\w+/B,utf,ucp,auto_callout
3787------------------------------------------------------------------
3788        Bra
3789        Callout 255 0 3
3790        prop Xwd ++
3791        Callout 255 3 0
3792        Ket
3793        End
3794------------------------------------------------------------------
3795    abcd
3796--->abcd
3797 +0 ^        \w+
3798 +3 ^   ^    End of pattern
3799 0: abcd
3800
3801/[\p{N}]?+/B,no_auto_possess
3802------------------------------------------------------------------
3803        Bra
3804        [\p{N}]?+
3805        Ket
3806        End
3807------------------------------------------------------------------
3808
3809/[\p{L}ab]{2,3}+/B,no_auto_possess
3810------------------------------------------------------------------
3811        Bra
3812        [ab\p{L}]{2,3}+
3813        Ket
3814        End
3815------------------------------------------------------------------
3816
3817/\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
3818------------------------------------------------------------------
3819        Bra
3820        \D+
3821        extuni
3822        \d+
3823        extuni
3824        \S+
3825        extuni
3826        \s+
3827        extuni
3828        \W+
3829        extuni
3830        \w+
3831        extuni
3832        \R+
3833        extuni
3834        \H+
3835        extuni
3836        \h+
3837        extuni
3838        \V+
3839        extuni
3840        \v+
3841        extuni
3842        a+
3843        extuni
3844        \x0a+
3845        extuni
3846        Any+
3847        extuni
3848        Ket
3849        End
3850------------------------------------------------------------------
3851
3852/.+\X/Bsx
3853------------------------------------------------------------------
3854        Bra
3855        AllAny+
3856        extuni
3857        Ket
3858        End
3859------------------------------------------------------------------
3860
3861/\X+$/Bmx
3862------------------------------------------------------------------
3863        Bra
3864        extuni+
3865     /m $
3866        Ket
3867        End
3868------------------------------------------------------------------
3869
3870/\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
3871------------------------------------------------------------------
3872        Bra
3873        extuni+
3874        \D
3875        extuni+
3876        \d
3877        extuni+
3878        \S
3879        extuni+
3880        \s
3881        extuni+
3882        \W
3883        extuni+
3884        \w
3885        extuni+
3886        Any
3887        extuni+
3888        \R
3889        extuni+
3890        \H
3891        extuni+
3892        \h
3893        extuni+
3894        \V
3895        extuni+
3896        \v
3897        extuni+
3898        extuni
3899        extuni+
3900        \Z
3901        extuni++
3902        \z
3903        extuni+
3904        $
3905        Ket
3906        End
3907------------------------------------------------------------------
3908
3909/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B,utf,ucp
3910------------------------------------------------------------------
3911        Bra
3912        prop Nd ++
3913        prop Xsp {0,5}+
3914        =
3915        prop Xsp *+
3916        notprop Xsp ?
3917        =
3918        prop Xwd {0,4}+
3919        notprop Xwd *+
3920        Ket
3921        End
3922------------------------------------------------------------------
3923
3924/[RST]+/Bi,utf,ucp
3925------------------------------------------------------------------
3926        Bra
3927        [R-Tr-t\x{17f}]++
3928        Ket
3929        End
3930------------------------------------------------------------------
3931
3932/[R-T]+/Bi,utf,ucp
3933------------------------------------------------------------------
3934        Bra
3935        [R-Tr-t\x{17f}]++
3936        Ket
3937        End
3938------------------------------------------------------------------
3939
3940/[Q-U]+/Bi,utf,ucp
3941------------------------------------------------------------------
3942        Bra
3943        [Q-Uq-u\x{17f}]++
3944        Ket
3945        End
3946------------------------------------------------------------------
3947
3948/^s?c/Iim,utf
3949Capture group count = 0
3950Options: caseless multiline utf
3951First code unit at start or follows newline
3952Last code unit = 'c' (caseless)
3953Subject length lower bound = 1
3954    scat
3955 0: sc
3956
3957/\X?abc/utf,no_start_optimize
3958    \xff\x7f\x00\x00\x03\x00\x41\xcc\x80\x41\x{300}\x61\x62\x63\x00\=no_utf_check,offset=06
3959 0: A\x{300}abc
3960
3961/\x{100}\x{200}\K\x{300}/utf,startchar
3962    \x{100}\x{200}\x{300}
3963 0: \x{100}\x{200}\x{300}
3964    ^^^^^^^^^^^^^^
3965
3966# Test UTF characters in a substitution
3967
3968bc/utf,replace=XሴZ
3969    123ábc123
3970 1: 123X\x{1234}Z123
3971
3972/(?<=abc)(|def)/g,utf,replace=<$0>
3973    123abcáyzabcdef789abcሴqr
3974 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
3975
3976/[A-`]/iB,utf
3977------------------------------------------------------------------
3978        Bra
3979        [A-z\x{212a}\x{17f}]
3980        Ket
3981        End
3982------------------------------------------------------------------
3983    abcdefghijklmno
3984 0: a
3985
3986/(?<=\K\x{17f})/g,utf,aftertext,allow_lookaround_bsk
3987    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
3988 0: \x{17f}
3989 0+ \x{17f}\x{17f}\x{17f}\x{17f}
3990 0: \x{17f}
3991 0+ \x{17f}\x{17f}\x{17f}
3992 0: \x{17f}
3993 0+ \x{17f}\x{17f}
3994 0: \x{17f}
3995 0+ \x{17f}
3996 0: \x{17f}
3997 0+
3998
3999/(?<=\K\x{17f})/altglobal,utf,aftertext,allow_lookaround_bsk
4000    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
4001 0: \x{17f}
4002 0+ \x{17f}\x{17f}\x{17f}\x{17f}
4003 0: \x{17f}
4004 0+ \x{17f}\x{17f}\x{17f}
4005 0: \x{17f}
4006 0+ \x{17f}\x{17f}
4007 0: \x{17f}
4008 0+ \x{17f}
4009 0: \x{17f}
4010 0+
4011
4012"\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"
4013Failed: error 122 at offset 1227: unmatched closing parenthesis
4014
4015/$(&.+[\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'})*?/
4016
4017"(*UTF)(*UCP)(.UTF).+X(\V+;\^(\D|)!999}(?(?C{7(?C')\H*\S*/^\x5\xa\\xd3\x85n?(;\D*(?m).[^mH+((*UCP)(*U:F)})(?!^)(?'"
4018Failed: error 162 at offset 113: subpattern name expected
4019
4020/[\pS#moq]/
4021    =
4022 0: =
4023
4024/(*:a\x{12345}b\t(d\)c)xxx/utf,alt_verbnames,mark
4025    cxxxz
4026 0: xxx
4027MK: a\x{12345}b\x{09}(d)c
4028
4029/abcd/utf,replace=x\x{824}y\o{3333}z(\Q12\$34$$\x34\E5$$),substitute_extended
4030    abcd
4031 1: x\x{824}y\x{6db}z(12\$34$$\x345$)
4032
4033/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
4034    a\x{e0}\x{101}\x{c0}\x{102}
4035 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
4036
4037/((?<digit>\d)|(?<letter>\p{L}))/g,substitute_extended,replace=<${digit:+digit; :not digit; }${letter:+letter:not a letter}>
4038    ab12cde
4039 7: <not digit; letter><not digit; letter><digit; not a letter><digit; not a letter><not digit; letter><not digit; letter><not digit; letter>
4040
4041/(*UCP)(*UTF)[[:>:]]X/B
4042------------------------------------------------------------------
4043        Bra
4044        \b (ucp)
4045        Assert back
4046        Reverse
4047        prop Xwd
4048        Ket
4049        X
4050        Ket
4051        End
4052------------------------------------------------------------------
4053
4054/abc/utf,replace=xyz
4055    abc\=zero_terminate
4056 1: xyz
4057
4058/a[[:punct:]b]/ucp,bincode
4059------------------------------------------------------------------
4060        Bra
4061        a
4062        [b[:punct:]]
4063        Ket
4064        End
4065------------------------------------------------------------------
4066
4067/a[[:punct:]b]/utf,ucp,bincode
4068------------------------------------------------------------------
4069        Bra
4070        a
4071        [b[:punct:]]
4072        Ket
4073        End
4074------------------------------------------------------------------
4075
4076/a[b[:punct:]]/utf,ucp,bincode
4077------------------------------------------------------------------
4078        Bra
4079        a
4080        [b[:punct:]]
4081        Ket
4082        End
4083------------------------------------------------------------------
4084
4085/[[:^ascii:]]/utf,ucp,bincode
4086------------------------------------------------------------------
4087        Bra
4088        [\x80-\xff] (neg)
4089        Ket
4090        End
4091------------------------------------------------------------------
4092
4093/[[:^ascii:]\w]/utf,ucp,bincode
4094------------------------------------------------------------------
4095        Bra
4096        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4097        Ket
4098        End
4099------------------------------------------------------------------
4100
4101/[\w[:^ascii:]]/utf,ucp,bincode
4102------------------------------------------------------------------
4103        Bra
4104        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4105        Ket
4106        End
4107------------------------------------------------------------------
4108
4109/[^[:ascii:]\W]/utf,ucp,bincode
4110------------------------------------------------------------------
4111        Bra
4112        [^\x00-\x7f\P{Xwd}]
4113        Ket
4114        End
4115------------------------------------------------------------------
4116    \x{de}
4117 0: \x{de}
4118    \x{200}
4119 0: \x{200}
4120\= Expect no match
4121    \x{589}
4122No match
4123    \x{37e}
4124No match
4125
4126/[[:^ascii:]a]/utf,ucp,bincode
4127------------------------------------------------------------------
4128        Bra
4129        [a\x80-\xff] (neg)
4130        Ket
4131        End
4132------------------------------------------------------------------
4133
4134/L(?#(|++<!(2)?/B,utf,no_auto_possess,auto_callout
4135------------------------------------------------------------------
4136        Bra
4137        Callout 255 0 14
4138        L?
4139        Callout 255 14 0
4140        Ket
4141        End
4142------------------------------------------------------------------
4143
4144/L(?#(|++<!(2)?/B,utf,ucp,auto_callout
4145------------------------------------------------------------------
4146        Bra
4147        Callout 255 0 14
4148        L?+
4149        Callout 255 14 0
4150        Ket
4151        End
4152------------------------------------------------------------------
4153
4154/(*UTF)C\x09((?<!'(?x)!*H? #\xcc\x9a[^$]/
4155Failed: error 114 at offset 39: missing closing parenthesis
4156
4157/[\D]/utf
4158    \x{1d7cf}
4159 0: \x{1d7cf}
4160
4161/[\D\P{Nd}]/utf
4162    \x{1d7cf}
4163 0: \x{1d7cf}
4164
4165/[^\D]/utf
4166    a9b
4167 0: 9
4168\= Expect no match
4169    \x{1d7cf}
4170No match
4171
4172/[^\D\P{Nd}]/utf
4173    a9b
4174 0: 9
4175    \x{1d7cf}
4176 0: \x{1d7cf}
4177\= Expect no match
4178    \x{10000}
4179No match
4180
4181# Hex uses pattern length, not zero-terminated. This tests for overrunning
4182# the given length of a pattern.
4183
4184/'(*UTF)'/hex
4185
4186/'#('/hex,extended,utf
4187
4188/a(?<=A\XB)/utf
4189Failed: error 125 at offset 1: length of lookbehind assertion is not limited
4190
4191/../utf,auto_callout
4192    \n\x{123}\x{123}\x{123}\x{123}
4193--->\x{0a}\x{123}\x{123}\x{123}\x{123}
4194 +0 ^                                      .
4195 +0       ^                                .
4196 +1       ^      ^                         .
4197 +2       ^             ^                  End of pattern
4198 0: \x{123}\x{123}
4199
4200# This tests processing wide characters in extended mode.
4201
4202/XȀ/x,utf
4203
4204# These three test a bug fix that was not clearing up after a locale setting
4205# when the test or a subsequent one matched a wide character.
4206
4207//locale=C
4208
4209/[\P{Yi}]/utf
4210\x{2f000}
4211 0: \x{2f000}
4212
4213/[\P{Yi}]/utf,locale=C
4214\x{2f000}
4215 0: \x{2f000}
4216
4217/^(?<!(?=��))/B,utf
4218------------------------------------------------------------------
4219        Bra
4220        ^
4221        Assert back not
4222        Assert
4223        \x{10385c}
4224        Ket
4225        Ket
4226        Ket
4227        End
4228------------------------------------------------------------------
4229
4230# Horizontal and vertical space lists ignore caseless
4231
4232/[\HH]/Bi,utf
4233------------------------------------------------------------------
4234        Bra
4235        [\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}]
4236        Ket
4237        End
4238------------------------------------------------------------------
4239
4240/[^\HH]/Bi,utf
4241------------------------------------------------------------------
4242        Bra
4243        [^\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}]
4244        Ket
4245        End
4246------------------------------------------------------------------
4247
4248//g,utf
4249    \=zero_terminate
4250 0:
4251
4252/^(?1)\p{Nd}{3}(a)/
4253    a123a
4254 0: a123a
4255 1: a
4256
4257/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info
4258Callout 1  x
4259
4260# ---------------------------------------------------------------------------
4261
4262# A bunch of tests that hit lines of code that others do not (at least when
4263# these were created).
4264
4265/^[^a]{3,}?x/i,utf,no_start_optimize,no_auto_possess
4266\= Expect no match
4267    bbb
4268No match
4269    cc
4270No match
4271
4272/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess
4273\= Expect no match
4274    aaa\x{100}
4275No match
4276
4277/^X\X/no_start_optimize,no_auto_possess
4278\= Expect no match
4279    X
4280No match
4281
4282/^X\p{L&}+?/no_start_optimize,no_auto_possess
4283\= Expect no match
4284    X
4285No match
4286
4287/^X\p{L}+?/no_start_optimize,no_auto_possess
4288\= Expect no match
4289    X
4290No match
4291
4292/^X\p{Lu}+?/no_start_optimize,no_auto_possess
4293\= Expect no match
4294    X
4295No match
4296
4297/^X\p{Arabic}+?/no_start_optimize,no_auto_possess
4298\= Expect no match
4299    X
4300No match
4301
4302/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess
4303\= Expect no match
4304    X
4305No match
4306
4307/^X\s+?/ucp,no_start_optimize,no_auto_possess
4308\= Expect no match
4309    X
4310No match
4311    XX
4312No match
4313
4314/^X\S+?/ucp,no_start_optimize,no_auto_possess
4315    XX
4316 0: XX
4317\= Expect no match
4318    X
4319No match
4320
4321/^X\w+?/ucp,no_start_optimize,no_auto_possess
4322\= Expect no match
4323    X
4324No match
4325
4326/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
4327\= Expect no match
4328    X
4329No match
4330
4331/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
4332\= Expect no match
4333    X
4334No match
4335
4336/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess
4337\= Expect no match
4338    X
4339No match
4340
4341/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
4342\= Expect no match
4343    X
4344No match
4345
4346/^X\R+?/utf,no_start_optimize,no_auto_possess
4347\= Expect no match
4348    X
4349No match
4350
4351/^X\H+?/utf,no_start_optimize,no_auto_possess
4352\= Expect no match
4353    X
4354No match
4355
4356/^X\V+?/utf,no_start_optimize,no_auto_possess
4357\= Expect no match
4358    X
4359No match
4360
4361/^X\s+?/utf,no_start_optimize,no_auto_possess
4362\= Expect no match
4363    X
4364No match
4365    XX
4366No match
4367
4368/^X\S+?/utf,no_start_optimize,no_auto_possess
4369\= Expect no match
4370    X
4371No match
4372
4373/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess
4374    XYYYZ
4375 0: XYYYZ
4376\= Expect no match
4377    XY
4378No match
4379    XYY
4380No match
4381    XYYY
4382No match
4383    XYYYYZ
4384No match
4385
4386/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess
4387\= Expect no match
4388    XY
4389No match
4390    XY!
4391No match
4392
4393/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess
4394\= Expect no match
4395    XY
4396No match
4397    XY!
4398No match
4399
4400/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess
4401\= Expect no match
4402    XY
4403No match
4404    XY!
4405No match
4406
4407/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess
4408\= Expect no match
4409    XY
4410No match
4411    XY!
4412No match
4413    XY\x{2f00}!
4414No match
4415
4416/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess
4417\= Expect no match
4418    XY
4419No match
4420    XY!
4421No match
4422
4423/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
4424\= Expect no match
4425    X\n
4426No match
4427    X\n!
4428No match
4429    X\n\n!
4430No match
4431
4432/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
4433\= Expect no match
4434    XYY\n
4435No match
4436
4437/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess
4438\= Expect no match
4439    XY
4440No match
4441    XY!
4442No match
4443    XYY!
4444No match
4445
4446/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess
4447\= Expect no match
4448    X
4449No match
4450    X\x{b5}
4451No match
4452    X\x{b5}\x{b5}Y
4453No match
4454
4455/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess
4456\= Expect no match
4457    X
4458No match
4459    X$
4460No match
4461    X@@Y
4462No match
4463
4464/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess
4465\= Expect partial match
4466    XYY\r\=ph
4467Partial match: XYY\x{0d}
4468\= Expect no match
4469    X
4470No match
4471
4472/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
4473\= Expect no match
4474    X
4475No match
4476    XYY
4477No match
4478
4479/^X\R+?Z/utf,no_start_optimize,no_auto_possess
4480\= Expect no match
4481    X\nX
4482No match
4483    X\n\rX
4484No match
4485    X\n\r\nX
4486No match
4487    X\n\n
4488No match
4489    X\n\x{0c}
4490No match
4491
4492/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess
4493\= Expect no match
4494    X\nX
4495No match
4496    X\n\rX
4497No match
4498    X\n\r\nX
4499No match
4500    X\n\n
4501No match
4502    X\n\x{0c}
4503No match
4504
4505/^X\H+?Z/utf,no_start_optimize,no_auto_possess
4506\= Expect no match
4507    XY\t
4508No match
4509    XYY
4510No match
4511
4512/^X\h+?Z/utf,no_start_optimize,no_auto_possess
4513\= Expect no match
4514    X\t\t
4515No match
4516    X\tY
4517No match
4518
4519/^X\V+?Z/utf,no_start_optimize,no_auto_possess
4520\= Expect no match
4521    XY\n
4522No match
4523    XYY
4524No match
4525
4526/^X\v+?Z/utf,no_start_optimize,no_auto_possess
4527\= Expect no match
4528    X\n\n
4529No match
4530    X\nY
4531No match
4532
4533/^X\D+?Z/utf,no_start_optimize,no_auto_possess
4534\= Expect no match
4535    XY9
4536No match
4537    XYY
4538No match
4539
4540/^X\d+?Z/utf,no_start_optimize,no_auto_possess
4541\= Expect no match
4542    X99
4543No match
4544    X9Y
4545No match
4546
4547/^X\S+?Z/utf,no_start_optimize,no_auto_possess
4548\= Expect no match
4549    XY\n
4550No match
4551    XYY
4552No match
4553
4554/^X\s+?Z/utf,no_start_optimize,no_auto_possess
4555\= Expect no match
4556    X\n\n
4557No match
4558    X\nY
4559No match
4560
4561/^X\W+?Z/utf,no_start_optimize,no_auto_possess
4562\= Expect no match
4563    X.A
4564No match
4565    X++
4566No match
4567
4568/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess
4569\= Expect no match
4570    XY
4571No match
4572    XY!
4573No match
4574
4575/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess
4576\= Expect no match
4577    XY
4578No match
4579
4580/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess
4581\= Expect no match
4582    XY
4583No match
4584
4585/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess
4586\= Expect no match
4587    XYY
4588No match
4589
4590/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess
4591\= Expect no match
4592    X$
4593No match
4594
4595# ----------------------------------------------------------------------
4596# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option.
4597
4598/\x{d800}/B,utf,bad_escape_is_literal
4599------------------------------------------------------------------
4600        Bra
4601        x{d800}
4602        Ket
4603        End
4604------------------------------------------------------------------
4605
4606/\ud800/B,utf,alt_bsux,bad_escape_is_literal
4607------------------------------------------------------------------
4608        Bra
4609        ud800
4610        Ket
4611        End
4612------------------------------------------------------------------
4613
4614# ----------------------------------------------------------------------
4615
4616/Aሴ+B/literal,utf,no_utf_check
4617    Aሴ+B
4618 0: A\x{1234}+B
4619
4620# These are here because I upgraded to Unicode 10.0.0 before Perl did, so it
4621# doesn't recognize all these scripts. In time these three tests can be moved
4622# to test 4.
4623
4624/^(\p{Adlam}+)(\p{Bhaiksuki}+)(\p{Marchen}+)(\p{Newa}+)(\p{Osage}+)
4625  (\p{Tangut}+)(\p{Masaram_Gondi}+)(\p{Nushu}+)(\p{Soyombo}+)
4626  (\p{Zanabazar_Square}+)/x,utf
4627    \x{1E900}\x{1E924}\x{1E953}\x{11C00}\x{11C2D}\x{11C3E}\x{11C70}\x{11C77}\x{11CAB}\x{11400}\x{1142F}\x{11455}\x{104B0}\x{104D8}\x{104FB}\x{16FE0}\x{18800}\x{18AF2}\x{11D00}\x{11D3A}\x{11D59}\x{16FE1}\x{1B170}\x{1B2FB}\x{11A50}\x{11A58}\x{11AA2}\x{11A00}\x{11A07}\x{11A47}
4628 0: \x{1e900}\x{1e924}\x{1e953}\x{11c00}\x{11c2d}\x{11c3e}\x{11c70}\x{11c77}\x{11cab}\x{11400}\x{1142f}\x{11455}\x{104b0}\x{104d8}\x{104fb}\x{16fe0}\x{18800}\x{18af2}\x{11d00}\x{11d3a}\x{11d59}\x{16fe1}\x{1b170}\x{1b2fb}\x{11a50}\x{11a58}\x{11aa2}\x{11a00}\x{11a07}\x{11a47}
4629 1: \x{1e900}\x{1e924}\x{1e953}
4630 2: \x{11c00}\x{11c2d}\x{11c3e}
4631 3: \x{11c70}\x{11c77}\x{11cab}
4632 4: \x{11400}\x{1142f}\x{11455}
4633 5: \x{104b0}\x{104d8}\x{104fb}
4634 6: \x{16fe0}\x{18800}\x{18af2}
4635 7: \x{11d00}\x{11d3a}\x{11d59}
4636 8: \x{16fe1}\x{1b170}\x{1b2fb}
4637 9: \x{11a50}\x{11a58}\x{11aa2}
463810: \x{11a00}\x{11a07}\x{11a47}
4639
4640/^\x{1E900}\x{104B0}/i,utf
4641    \x{1E900}\x{104B0}
4642 0: \x{1e900}\x{104b0}
4643    \x{1E922}\x{104D8}
4644 0: \x{1e922}\x{104d8}
4645
4646/^(?:(\X)(?C))+$/utf
4647    \x{1E900}\x{1E924}\x{1E953}\x{11C00}\x{11C2D}\x{11C3E}\x{11C70}\x{11C77}\x{11CAB}\x{11400}\x{1142F}\x{11455}\x{104B0}\x{104D8}\x{104FB}\x{16FE0}\x{18800}\x{18AF2}\x{11D00}\x{11D3A}\x{11D59}\x{16FE1}\x{1B170}\x{1B2FB}\x{11A50}\x{11A58}\x{11AA2}\x{11A00}\x{11A07}\x{11A47}\=callout_capture,callout_no_where
4648Callout 0: last capture = 1
4649 1: \x{1e900}
4650Callout 0: last capture = 1
4651 1: \x{1e924}
4652Callout 0: last capture = 1
4653 1: \x{1e953}
4654Callout 0: last capture = 1
4655 1: \x{11c00}
4656Callout 0: last capture = 1
4657 1: \x{11c2d}\x{11c3e}
4658Callout 0: last capture = 1
4659 1: \x{11c70}
4660Callout 0: last capture = 1
4661 1: \x{11c77}\x{11cab}
4662Callout 0: last capture = 1
4663 1: \x{11400}
4664Callout 0: last capture = 1
4665 1: \x{1142f}
4666Callout 0: last capture = 1
4667 1: \x{11455}
4668Callout 0: last capture = 1
4669 1: \x{104b0}
4670Callout 0: last capture = 1
4671 1: \x{104d8}
4672Callout 0: last capture = 1
4673 1: \x{104fb}
4674Callout 0: last capture = 1
4675 1: \x{16fe0}
4676Callout 0: last capture = 1
4677 1: \x{18800}
4678Callout 0: last capture = 1
4679 1: \x{18af2}
4680Callout 0: last capture = 1
4681 1: \x{11d00}\x{11d3a}
4682Callout 0: last capture = 1
4683 1: \x{11d59}
4684Callout 0: last capture = 1
4685 1: \x{16fe1}
4686Callout 0: last capture = 1
4687 1: \x{1b170}
4688Callout 0: last capture = 1
4689 1: \x{1b2fb}
4690Callout 0: last capture = 1
4691 1: \x{11a50}\x{11a58}
4692Callout 0: last capture = 1
4693 1: \x{11aa2}
4694Callout 0: last capture = 1
4695 1: \x{11a00}\x{11a07}\x{11a47}
4696 0: \x{1e900}\x{1e924}\x{1e953}\x{11c00}\x{11c2d}\x{11c3e}\x{11c70}\x{11c77}\x{11cab}\x{11400}\x{1142f}\x{11455}\x{104b0}\x{104d8}\x{104fb}\x{16fe0}\x{18800}\x{18af2}\x{11d00}\x{11d3a}\x{11d59}\x{16fe1}\x{1b170}\x{1b2fb}\x{11a50}\x{11a58}\x{11aa2}\x{11a00}\x{11a07}\x{11a47}
4697 1: \x{11a00}\x{11a07}\x{11a47}
4698
4699# Similarly for Unicode 11.0.0
4700
4701/^(\p{Dogra}+)(\p{Gunjala_Gondi}+)(\p{Hanifi_Rohingya}+)(\p{Makasar}+)
4702  (\p{Medefaidrin}+)(\p{Old_Sogdian}+)(\p{Sogdian}+)/x,utf
4703    \x{11800}\x{11da9}\x{10d27}\x{11ee0}\x{16e48}\x{10f27}\x{10f30}
4704 0: \x{11800}\x{11da9}\x{10d27}\x{11ee0}\x{16e48}\x{10f27}\x{10f30}
4705 1: \x{11800}
4706 2: \x{11da9}
4707 3: \x{10d27}
4708 4: \x{11ee0}
4709 5: \x{16e48}
4710 6: \x{10f27}
4711 7: \x{10f30}
4712
4713# Regional indicators
4714
4715/^(\X)(\X)/utf,aftertext
4716    \x{1F1E6}\x{1F1E7}\x{1F1E7}B
4717 0: \x{1f1e6}\x{1f1e7}\x{1f1e7}
4718 0+ B
4719 1: \x{1f1e6}\x{1f1e7}
4720 2: \x{1f1e7}
4721    \x{1F1E6}\x{1F1E7}\x{1F1E7}\x{1F1E6}B
4722 0: \x{1f1e6}\x{1f1e7}\x{1f1e7}\x{1f1e6}
4723 0+ B
4724 1: \x{1f1e6}\x{1f1e7}
4725 2: \x{1f1e7}\x{1f1e6}
4726
4727# More differences from Perl
4728
4729/^\p{Common}/utf
4730    \x{60c}
4731 0: \x{60c}
4732    \x{61f}
4733 0: \x{61f}
4734    \x{964}
4735 0: \x{964}
4736    \x{965}
4737 0: \x{965}
4738
4739/^\p{Inherited}/utf
4740    \x{64b}
4741 0: \x{64b}
4742    \x{654}
4743 0: \x{654}
4744    \x{655}
4745 0: \x{655}
4746    \x{1D1AA}
4747 0: \x{1d1aa}
4748
4749/\N{U+}/
4750Failed: error 193 at offset 2: \N{U+dddd} is supported only in Unicode (UTF) mode
4751
4752/\N{U+}/utf
4753Failed: error 178 at offset 5: digits missing in \x{} or \o{} or \N{U+}
4754
4755/\N{U}/
4756Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u
4757
4758# This tests the non-UTF Unicode NEL pattern whitespace character, only
4759# recognized by PCRE2 with /x when there is Unicode support.
4760
4761/A
4762
4763�B/x
4764    AB
4765 0: AB
4766
4767# This tests Unicode Pattern White Space characters in verb names when they
4768# are being processed with PCRE2_EXTENDED. Note: there are UTF-8 characters
4769# with code points greater than 255 between A, B, and C in the pattern.
4770
4771/(*: A‎B
C)abc/x,utf,mark,alt_verbnames
4772    abc
4773 0: abc
4774MK: ABC
4775
4776# Script run tests: auto-possessification
4777
4778/^(*sr:.*)/B,utf
4779------------------------------------------------------------------
4780        Bra
4781        ^
4782        Script run
4783        Any*
4784        Ket
4785        Ket
4786        End
4787------------------------------------------------------------------
4788    paypаl.com   A classic example of why script run checks are a good thing
4789 0: payp
4790
4791/^(*sr:.*(*ACCEPT))/utf
4792    paypаl.com   But *ACCEPT breaks things
4793 0: payp\x{430}l.com   But *ACCEPT breaks things
4794
4795/^(*sr:\x{2e80}*)/B,utf
4796------------------------------------------------------------------
4797        Bra
4798        ^
4799        Script run
4800        \x{2e80}*+
4801        Ket
4802        Ket
4803        End
4804------------------------------------------------------------------
4805
4806/^(*sr:\x{2e80}*)\x{2e80}/B,utf
4807------------------------------------------------------------------
4808        Bra
4809        ^
4810        Script run
4811        \x{2e80}*
4812        Ket
4813        \x{2e80}
4814        Ket
4815        End
4816------------------------------------------------------------------
4817
4818/(?<!)(*sr:)/B
4819------------------------------------------------------------------
4820        Bra
4821        Assert back not
4822        Ket
4823        Script run
4824        Ket
4825        Ket
4826        End
4827------------------------------------------------------------------
4828
4829/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./B
4830------------------------------------------------------------------
4831        Bra
4832        Assert back
4833        Reverse
4834        abc
4835        Assert
4836        X
4837        Script run
4838        BXY
4839        Ket
4840        CCC
4841        Ket
4842        XBXYCCC
4843        Ket
4844        Any
4845        Ket
4846        End
4847------------------------------------------------------------------
4848   abcXBXYCCC!
4849 0: !
4850
4851# Some script run patterns are broken in Perl 5.28.0. These can be moved into
4852# test 4 when a mended version of Perl is released.
4853
4854/^(*sr:.{4})/utf
4855    \x{0980}12\x{0993}     Bengali Common-digits Bengali
4856 0: \x{980}12\x{993}
4857    \x{0780}12\x{07b1}     Thaana Common-digits Thaana
4858 0: \x{780}12\x{7b1}
4859    \x{0e01}12\x{0e5b}     Thai Common-digits Thai
4860 0: \x{e01}12\x{e5b}
4861    \x{1780}12\x{19ff}     Khmer Common-digits Khmer
4862 0: \x{1780}12\x{19ff}
4863    \x{0904}12\x{0939}     Devanagari Common-digits Devanagari
4864 0: \x{904}12\x{939}
4865    A\x{ff10}\x{ff19}B     Latin Common-notascii-digits Latin
4866 0: A\x{ff10}\x{ff19}B
4867    A\x{1d7ce}\x{1d7cf}B   Latin fancy-common-digits Latin
4868 0: A\x{1d7ce}\x{1d7cf}B
4869
4870# These ones involve non-ASCII but nevertheless Common digits. As of October
4871# 2018 even blead Perl wasn't handling all of these - but is going to.
4872
4873/^(*sr:.{4})/utf
4874    A\x{ff10}\x{ff19}B     Latin Common-notascii-digits Latin
4875 0: A\x{ff10}\x{ff19}B
4876    \x{ff10}\x{ff19}..     Common-notascii-digits Common Common
4877 0: \x{ff10}\x{ff19}..
4878    A\x{ff10}BC            Latin Common-notascii-digit Latin Latin
4879 0: A\x{ff10}BC
4880    A\x{1d7ce}\x{1d7cf}B   Latin fancy-common-digits Latin
4881 0: A\x{1d7ce}\x{1d7cf}B
4882    \x{1d7ce}\x{1d7cf},,   fancy-common-digits Common Common
4883 0: \x{1d7ce}\x{1d7cf},,
4884    A\x{1d7ce}BC           Latin fancy-common-digit Latin Latin
4885 0: A\x{1d7ce}BC
4886
4887# Some Unicode 12.1.0 new script characters
4888
4889/\p{Elymaic}\p{Nandinagari}\p{Nyiakeng_Puachue_Hmong}\p{Wancho}/utf
4890    \x{10fe5}\x{119AC}\x{1E10E}\x{1E2D1}
4891 0: \x{10fe5}\x{119ac}\x{1e10e}\x{1e2d1}
4892
4893# Some Unicode 13.0.0 new script characters
4894
4895/\p{Chorasmian}\p{Dives_Akuru}\p{Khitan_Small_Script}\p{Yezidi}/utf
4896    \x{10FB0}\x{11900}\x{18B00}\x{10E80}
4897 0: \x{10fb0}\x{11900}\x{18b00}\x{10e80}
4898
4899# -------
4900
4901# Test reference and errors in non-ASCII characters in group names
4902
4903/(?'��ABC'...)/I,utf
4904Capture group count = 1
4905Named capture groups:
4906  ��ABC   1
4907Options: utf
4908Subject length lower bound = 3
4909   abcde\=copy=��ABC
4910 0: abc
4911 1: abc
4912  C abc (3) ��ABC (group 1)
4913
4914# Bad ones
4915
4916/(?'AB၌C'...)\g{AB၌C}/utf
4917Failed: error 142 at offset 5: syntax error in subpattern name (missing terminator?)
4918
4919/(?'٠ABC'...)/utf
4920Failed: error 144 at offset 3: subpattern name must start with a non-digit
4921
4922/(?'²ABC'...)/utf
4923Failed: error 162 at offset 3: subpattern name expected
4924
4925/(?'X²ABC'...)/utf
4926Failed: error 142 at offset 4: syntax error in subpattern name (missing terminator?)
4927
4928# -------
4929
4930/\p{Any}*xyz/I
4931Capture group count = 0
4932Compile options: <none>
4933Overall options: anchored
4934Last code unit = 'z'
4935Subject length lower bound = 3
4936
4937/(|�)7/caseless,ucp
4938
4939/(\xc1)\1/i,ucp
4940    \xc1\xe1\=no_jit
4941 0: \xc1\xe1
4942 1: \xc1
4943
4944/\p{L&}+\p{bidi_control}/B
4945------------------------------------------------------------------
4946        Bra
4947        prop Lc +
4948        prop Bidicontrol
4949        Ket
4950        End
4951------------------------------------------------------------------
4952
4953/\p{bidi_control}+\p{L&}/B
4954------------------------------------------------------------------
4955        Bra
4956        prop Bidicontrol +
4957        prop Lc
4958        Ket
4959        End
4960------------------------------------------------------------------
4961
4962/\p{han}/B
4963------------------------------------------------------------------
4964        Bra
4965        prop Han
4966        Ket
4967        End
4968------------------------------------------------------------------
4969
4970/\p{script:han}/B
4971------------------------------------------------------------------
4972        Bra
4973        prop script:Han
4974        Ket
4975        End
4976------------------------------------------------------------------
4977
4978/\p{sc:han}/B
4979------------------------------------------------------------------
4980        Bra
4981        prop script:Han
4982        Ket
4983        End
4984------------------------------------------------------------------
4985
4986/\p{script extensions:han}/B
4987------------------------------------------------------------------
4988        Bra
4989        prop Han
4990        Ket
4991        End
4992------------------------------------------------------------------
4993
4994/\p{scx:han}/B
4995------------------------------------------------------------------
4996        Bra
4997        prop Han
4998        Ket
4999        End
5000------------------------------------------------------------------
5001
5002# Test error - invalid script name
5003
5004/\p{sc:L}/
5005Failed: error 147 at offset 8: unknown property after \P or \p
5006
5007# Some Boolean property tests that differ from Perl
5008
5009/\p{emojimodifierbase}\p{ebase}/g,utf
5010    >AN<>\x{261d}\x{1faf6}<>yz<
5011 0: \x{261d}\x{1faf6}
5012
5013/\p{graphemelink}\p{grlink}/g,utf
5014    >AN<>\x{11d97}\x{94d}<>yz<
5015 0: \x{11d97}\x{94d}
5016
5017/\p{soft dotted}\p{sd}/g,utf
5018    >AF23<>\x{1df1a}\x{69}<>yz<
5019 0: \x{1df1a}i
5020
5021# ------------------------------------------------
5022
5023/\p{\2b[:x�igi:t:_/
5024Failed: error 146 at offset 17: malformed \P or \p sequence
5025
5026# Tests for PCRE2_EXTRA_CASELESS_RESTRICT. Compare each test with and without
5027# the restriction.
5028
5029/AskZ/i,utf,caseless_restrict
5030    AskZ
5031 0: AskZ
5032    aSKz
5033 0: aSKz
5034\= Expect no match
5035    A\x{17f}kZ
5036No match
5037    As\x{212a}Z
5038No match
5039
5040/AskZ/i,utf
5041    AskZ
5042 0: AskZ
5043    aSKz
5044 0: aSKz
5045    A\x{17f}kZ
5046 0: A\x{17f}kZ
5047    As\x{212a}Z
5048 0: As\x{212a}Z
5049
5050/A\x{17f}\x{212a}Z/ir,utf
5051    \= Expect no match
5052    AskZ
5053No match
5054
5055/A\x{17f}\x{212a}Z/i,utf
5056    AskZ
5057 0: AskZ
5058
5059/[AskZ]+/i,utf,caseless_restrict
5060    AskZ
5061 0: AskZ
5062    aSKz
5063 0: aSKz
5064    A\x{17f}kZ
5065 0: A
5066    As\x{212a}Z
5067 0: As
5068
5069/[AskZ]+/i,utf
5070    AskZ
5071 0: AskZ
5072    aSKz
5073 0: aSKz
5074    A\x{17f}kZ
5075 0: A\x{17f}kZ
5076    As\x{212a}Z
5077 0: As\x{212a}Z
5078
5079/[\x{17f}\x{212a}]+/ir,utf
5080\= Expect no match
5081    AskZ
5082No match
5083
5084/[\x{17f}\x{212a}]+/i,utf
5085    AskZ
5086 0: sk
5087
5088/[^s]+/ir,utf
5089    A\x{17f}Z
5090 0: A\x{17f}Z
5091
5092/[^s]+/i,utf
5093    A\x{17f}Z
5094 0: A
5095
5096/[^k]+/ir,utf
5097    A\x{212a}Z
5098 0: A\x{212a}Z
5099
5100/[^k]+/i,utf
5101    A\x{212a}Z
5102 0: A
5103
5104/[^sk]+/ir,utf
5105    A\x{17f}\x{212a}Z
5106 0: A\x{17f}\x{212a}Z
5107
5108/[^sk]+/i,utf
5109    A\x{17f}\x{212a}Z
5110 0: A
5111
5112/[^\x{17f}]+/ir,utf
5113    AsSZ
5114 0: AsSZ
5115
5116/[^\x{17f}]+/i,utf
5117    AsSZ
5118 0: A
5119
5120/[Ss]+/irB,utf
5121------------------------------------------------------------------
5122        Bra
5123     /i S++
5124        Ket
5125        End
5126------------------------------------------------------------------
5127    Sss\x{17f}ss
5128 0: Sss
5129
5130/[Ss]+/iB,utf
5131------------------------------------------------------------------
5132        Bra
5133        [Ss\x{17f}\x{17f}]++
5134        Ket
5135        End
5136------------------------------------------------------------------
5137    Sss\x{17f}ss
5138 0: Sss\x{17f}ss
5139
5140/[S\x{17f}]/irB,utf
5141------------------------------------------------------------------
5142        Bra
5143        [Ss\x{17f}]
5144        Ket
5145        End
5146------------------------------------------------------------------
5147
5148/[S\x{17f}]/iB,utf
5149------------------------------------------------------------------
5150        Bra
5151        [Ss\x{17f}\x{17f}]
5152        Ket
5153        End
5154------------------------------------------------------------------
5155
5156/[\x{17f}s]/irB,utf
5157------------------------------------------------------------------
5158        Bra
5159        [Ss\x{17f}]
5160        Ket
5161        End
5162------------------------------------------------------------------
5163
5164/[\x{17f}s]/iB,utf
5165------------------------------------------------------------------
5166        Bra
5167        [Ss\x{17f}\x{17f}]
5168        Ket
5169        End
5170------------------------------------------------------------------
5171
5172/[\x{4b}\x{6b}]/irB,utf
5173------------------------------------------------------------------
5174        Bra
5175     /i K
5176        Ket
5177        End
5178------------------------------------------------------------------
5179
5180/[\x{4b}\x{6b}]/iB,utf
5181------------------------------------------------------------------
5182        Bra
5183        [Kk\x{212a}\x{212a}]
5184        Ket
5185        End
5186------------------------------------------------------------------
5187
5188/s(?r)s(?-r)s(?r:s)s/i,utf
5189    \x{17f}S\x{17f}S\x{17f}
5190 0: \x{17f}S\x{17f}S\x{17f}
5191\= Expect no match
5192    \x{17f}\x{17f}\x{17f}S\x{17f}
5193No match
5194    \x{17f}S\x{17f}\x{17f}\x{17f}
5195No match
5196
5197/k(?^i)k/ir,utf
5198    K\x{212a}
5199 0: K\x{212a}
5200\= Expect no match
5201    \x{212a}\x{212a}
5202No match
5203
5204# End caseless restrict tests
5205
5206# TESTS for PCRE2_EXTRA_ASCII_xxx - again, tests with and without.
5207
5208# DIGITS
5209
5210/\d+/i,utf
5211    123\x{660}456
5212 0: 123
5213
5214/\d+/i,utf,ucp
5215    123\x{660}456
5216 0: 123\x{660}456
5217
5218/\d+/i,utf,ucp,ascii_bsd
5219    123\x{660}456
5220 0: 123
5221
5222/[\d]+/i,utf
5223    123\x{660}456
5224 0: 123
5225
5226/[\d]+/i,utf,ucp
5227    123\x{660}456
5228 0: 123\x{660}456
5229
5230/[\d]+/i,utf,ucp,ascii_bsd
5231    123\x{660}456
5232 0: 123
5233
5234/\d(?aD)\d(?-aD)\d/utf,ucp
5235    \x{660}9\x{660}
5236 0: \x{660}9\x{660}
5237\= Expect no match
5238    \x{660}\x{660}\x{660}
5239No match
5240
5241/\d(?-aD)\d(?aD)\d/utf,ucp,ascii_bsd
5242    999
5243 0: 999
5244    9\x{660}9
5245 0: 9\x{660}9
5246
5247/\d(?a)\d(?-a)\d/utf,ucp
5248    \x{660}9\x{660}
5249 0: \x{660}9\x{660}
5250\= Expect no match
5251    \x{660}\x{660}\x{660}
5252No match
5253
5254/\d(?-aD)\d(?aD)\d/utf,ucp,ascii_bsd
5255    999
5256 0: 999
5257    9\x{660}9
5258 0: 9\x{660}9
5259
5260# SPACES
5261
5262/>\s+</i,utf
5263    >  <
5264 0: >  <
5265\= Expect no match
5266    >\x{a0} <
5267No match
5268
5269/>\s+</i,utf,ucp
5270    >  <
5271 0: >  <
5272    >\x{a0} <
5273 0: >\x{a0} <
5274
5275/>\s+</i,utf,ucp,ascii_bss
5276    >  <
5277 0: >  <
5278\= Expect no match
5279    >\x{a0} <
5280No match
5281
5282/>[\s]+</i,utf
5283    >  <
5284 0: >  <
5285\= Expect no match
5286    >\x{a0} <
5287No match
5288
5289/>[\s]+</i,utf,ucp
5290    >  <
5291 0: >  <
5292    >\x{a0} <
5293 0: >\x{a0} <
5294
5295/>[\s]+</i,utf,ucp,ascii_bss
5296    >  <
5297 0: >  <
5298\= Expect no match
5299    >\x{a0} <
5300No match
5301
5302/>\s(?aS)\s(?-aS)\s</utf,ucp
5303    >\x{a0} \x{a0}<
5304 0: >\x{a0} \x{a0}<
5305\= Expect no match
5306    >\x{a0}\x{a0}\x{a0}<
5307No match
5308
5309/>\s(?a)\s(?-a)\s</utf,ucp
5310    >\x{a0} \x{a0}<
5311 0: >\x{a0} \x{a0}<
5312\= Expect no match
5313    >\x{a0}\x{a0}\x{a0}<
5314No match
5315
5316# WORDS
5317
5318/\w+/i,utf
5319    123\x{660}abc
5320 0: 123
5321
5322/\w+/i,utf,ucp
5323    123\x{660}abc
5324 0: 123\x{660}abc
5325
5326/\w+/i,utf,ucp,ascii_bsw
5327    123\x{660}abc
5328 0: 123
5329
5330/[\w]+/i,utf
5331    123\x{660}abc
5332 0: 123
5333
5334/[\w]+/i,utf,ucp
5335    123\x{660}abc
5336 0: 123\x{660}abc
5337
5338/[\w]+/i,utf,ucp,ascii_bsw
5339    123\x{660}abc
5340 0: 123
5341
5342/\w(?aW)\w(?-aW)\w/utf,ucp
5343    \x{660}A\x{c0}
5344 0: \x{660}A\x{c0}
5345\= Expect no match
5346    \x{660}\x{c0}\x{c0}
5347No match
5348
5349/\w(?a)\w(?-a)\w/utf,ucp
5350    \x{660}A\x{c0}
5351 0: \x{660}A\x{c0}
5352\= Expect no match
5353    \x{660}\x{c0}\x{c0}
5354No match
5355
5356# WORD BOUNDARY
5357
5358/\bABC\b/utf
5359    \x{c0}ABC\x{d0}
5360 0: ABC
5361
5362/\bABC\b/utf,ucp
5363\= Expect no match
5364    \x{c0}ABC\x{d0}
5365No match
5366
5367/\bABC\b/utf,ucp,ascii_bsw
5368    \x{c0}ABC\x{d0}
5369 0: ABC
5370
5371/\bABC\b/utf,ucp,ascii_all
5372    \x{c0}ABC\x{d0}
5373 0: ABC
5374
5375# POSIX
5376
5377/^[[:digit:]]+$/utf,ucp
5378    123456
5379 0: 123456
5380    123\x{660}456
5381 0: 123\x{660}456
5382
5383/^[[:digit:]]+$/utf,ucp,ascii_digit
5384    123456
5385 0: 123456
5386\= Expect no match
5387    123\x{660}456
5388No match
5389
5390/[[:digit:]]+/g,utf,ucp,ascii_digit
5391    123\x{660}456
5392 0: 123
5393 0: 456
5394
5395/(?-aT)[[:digit:]](?aT)[[:digit:]]/utf,ucp,ascii_digit
5396    11
5397 0: 11
5398    \x{ff11}1
5399 0: \x{ff11}1
5400\= Expect no match
5401    1\x{ff11}
5402No match
5403
5404/(?-aT:[[:digit:]])[[:digit:]]/utf,ucp,ascii_digit
5405    11
5406 0: 11
5407    \x{ff11}1
5408 0: \x{ff11}1
5409\= Expect no match
5410    1\x{ff11}
5411No match
5412
5413/(?-aT:[[:digit:]])[[:digit:]]/utf,never_ucp,ascii_digit
5414    11
5415 0: 11
5416\= Expect no match
5417    \x{ff11}1
5418No match
5419    1\x{ff11}
5420No match
5421
5422/[[:digit:]]+/utf,ucp,ascii_posix
5423    123\x{660}456
5424 0: 123
5425
5426/(?-aP)[[:digit:]](?aP)[[:digit:]]/utf,ucp,ascii_posix
5427    11
5428 0: 11
5429    \x{ff11}1
5430 0: \x{ff11}1
5431\= Expect no match
5432    1\x{ff11}
5433No match
5434
5435/(?-aP:[[:digit:]])[[:digit:]]/utf,ucp,ascii_posix
5436    11
5437 0: 11
5438    \x{ff11}1
5439 0: \x{ff11}1
5440\= Expect no match
5441    1\x{ff11}
5442No match
5443
5444/(?-a:[[:digit:]])[[:digit:]]/a,utf,ucp
5445    11
5446 0: 11
5447    \x{ff11}1
5448 0: \x{ff11}1
5449\= Expect no match
5450    1\x{ff11}
5451No match
5452
5453/^[[:xdigit:]]+$/utf,ucp
5454    f0
5455 0: f0
5456    1A
5457 0: 1A
5458    d\x{ff10}
5459 0: d\x{ff10}
5460    \x{ff26}8
5461 0: \x{ff26}8
5462\= Expect no match
5463    8g\=no_jit
5464No match
5465
5466/^[[:xdigit:]]+$/utf,ucp,ascii_digit
5467    f0
5468 0: f0
5469    1A
5470 0: 1A
5471\= Expect no match
5472    d\x{ff10}
5473No match
5474    \x{ff26}8
5475No match
5476    8g
5477No match
5478
5479/>[[:space:]]+</utf,ucp
5480    >\x{a0} \x{a0}<
5481 0: >\x{a0} \x{a0}<
5482    >\x{a0}\x{a0}\x{a0}<
5483 0: >\x{a0}\x{a0}\x{a0}<
5484
5485/>[[:space:]]+</utf,ucp,ascii_posix
5486\= Expect no match
5487    >\x{a0} \x{a0}<
5488No match
5489
5490/(?aP)[[:alnum:]]+/i,ucp,utf
5491    abcáxyz
5492 0: abc
5493    abc\x{660}xyz
5494 0: abc
5495
5496/(?aP)[[:alnum:]\d]+/i,ucp,utf
5497    abc\x{660}xyz
5498 0: abc\x{660}xyz
5499
5500/(*UCP)(*UTF)[[:alnum:]](?aP:[[:alnum:]])[[:alnum:]]/
5501    \x{660}A\x{660}
5502 0: \x{660}A\x{660}
5503\= Expect no match
5504    \x{660}\x{660}\x{660}
5505No match
5506
5507# VARIOUS
5508
5509/[\d\s\w]+/a,ucp,utf
5510    9 A\x{660}À
5511 0: 9 A
5512    9 AÀ\x{660}
5513 0: 9 A
5514
5515# End PCRE2_EXTRA_ASCII_xxx tests
5516
5517/(?<!(|l ))/utf
5518    (?<!(|l ))
5519No match
5520
5521# End of testinput5
5522