• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This set of tests checks the API, internals, and non-Perl stuff for UTF
2# support, including Unicode properties. However, tests that give different
3# results in 8-bit, 16-bit, and 32-bit modes are excluded (see tests 10 and
4# 12).
5
6#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------------------------------------------------------------------
150Capturing subpattern 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------------------------------------------------------------------
167Capturing subpattern 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------------------------------------------------------------------
182Capturing subpattern 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------------------------------------------------------------------
196Capturing subpattern 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------------------------------------------------------------------
241Capturing subpattern 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------------------------------------------------------------------
254Capturing subpattern 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------------------------------------------------------------------
267Capturing subpattern 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------------------------------------------------------------------
294Capturing subpattern 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------------------------------------------------------------------
307Capturing subpattern 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------------------------------------------------------------------
346Capturing subpattern 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------------------------------------------------------------------
366Capturing subpattern 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------------------------------------------------------------------
397Capturing subpattern 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------------------------------------------------------------------
417Capturing subpattern 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------------------------------------------------------------------
448Capturing subpattern 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------------------------------------------------------------------
474Capturing subpattern count = 0
475Compile options: no_start_optimize utf
476Overall options: anchored no_start_optimize utf
477Subject length lower bound = 0
478
479/()()()()()()()()()()
480 ()()()()()()()()()()
481 ()()()()()()()()()()
482 ()()()()()()()()()()
483 A (x) (?41) B/x,utf
484    AxxB
485Matched, but too many substrings
486 0: AxxB
487 1:
488 2:
489 3:
490 4:
491 5:
492 6:
493 7:
494 8:
495 9:
49610:
49711:
49812:
49913:
50014:
501
502/^[\x{100}\E-\Q\E\x{150}]/B,utf
503------------------------------------------------------------------
504        Bra
505        ^
506        [\x{100}-\x{150}]
507        Ket
508        End
509------------------------------------------------------------------
510
511/^[\QĀ\E-\QŐ\E]/B,utf
512------------------------------------------------------------------
513        Bra
514        ^
515        [\x{100}-\x{150}]
516        Ket
517        End
518------------------------------------------------------------------
519
520/^abc./gmx,newline=any,utf
521    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
522 0: abc1
523 0: abc2
524 0: abc3
525 0: abc4
526 0: abc5
527 0: abc6
528 0: abc7
529 0: abc8
530 0: abc9
531
532/abc.$/gmx,newline=any,utf
533    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
534 0: abc1
535 0: abc2
536 0: abc3
537 0: abc4
538 0: abc5
539 0: abc6
540 0: abc7
541 0: abc8
542 0: abc9
543
544/^a\Rb/bsr=unicode,utf
545    a\nb
546 0: a\x{0a}b
547    a\rb
548 0: a\x{0d}b
549    a\r\nb
550 0: a\x{0d}\x{0a}b
551    a\x0bb
552 0: a\x{0b}b
553    a\x0cb
554 0: a\x{0c}b
555    a\x{85}b
556 0: a\x{85}b
557    a\x{2028}b
558 0: a\x{2028}b
559    a\x{2029}b
560 0: a\x{2029}b
561\= Expect no match
562    a\n\rb
563No match
564
565/^a\R*b/bsr=unicode,utf
566    ab
567 0: ab
568    a\nb
569 0: a\x{0a}b
570    a\rb
571 0: a\x{0d}b
572    a\r\nb
573 0: a\x{0d}\x{0a}b
574    a\x0bb
575 0: a\x{0b}b
576    a\x0c\x{2028}\x{2029}b
577 0: a\x{0c}\x{2028}\x{2029}b
578    a\x{85}b
579 0: a\x{85}b
580    a\n\rb
581 0: a\x{0a}\x{0d}b
582    a\n\r\x{85}\x0cb
583 0: a\x{0a}\x{0d}\x{85}\x{0c}b
584
585/^a\R+b/bsr=unicode,utf
586    a\nb
587 0: a\x{0a}b
588    a\rb
589 0: a\x{0d}b
590    a\r\nb
591 0: a\x{0d}\x{0a}b
592    a\x0bb
593 0: a\x{0b}b
594    a\x0c\x{2028}\x{2029}b
595 0: a\x{0c}\x{2028}\x{2029}b
596    a\x{85}b
597 0: a\x{85}b
598    a\n\rb
599 0: a\x{0a}\x{0d}b
600    a\n\r\x{85}\x0cb
601 0: a\x{0a}\x{0d}\x{85}\x{0c}b
602\= Expect no match
603    ab
604No match
605
606/^a\R{1,3}b/bsr=unicode,utf
607    a\nb
608 0: a\x{0a}b
609    a\n\rb
610 0: a\x{0a}\x{0d}b
611    a\n\r\x{85}b
612 0: a\x{0a}\x{0d}\x{85}b
613    a\r\n\r\nb
614 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
615    a\r\n\r\n\r\nb
616 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
617    a\n\r\n\rb
618 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
619    a\n\n\r\nb
620 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
621\= Expect no match
622    a\n\n\n\rb
623No match
624    a\r
625No match
626
627/\H\h\V\v/utf
628    X X\x0a
629 0: X X\x{0a}
630    X\x09X\x0b
631 0: X\x{09}X\x{0b}
632\= Expect no match
633    \x{a0} X\x0a
634No match
635
636/\H*\h+\V?\v{3,4}/utf
637    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
638 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
639    \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
640 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
641    \x09\x20\x{a0}\x0a\x0b\x0c
642 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
643\= Expect no match
644    \x09\x20\x{a0}\x0a\x0b
645No match
646
647/\H\h\V\v/utf
648    \x{3001}\x{3000}\x{2030}\x{2028}
649 0: \x{3001}\x{3000}\x{2030}\x{2028}
650    X\x{180e}X\x{85}
651 0: X\x{180e}X\x{85}
652\= Expect no match
653    \x{2009} X\x0a
654No match
655
656/\H*\h+\V?\v{3,4}/utf
657    \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
658 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
659    \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
660 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
661    \x09\x20\x{202f}\x0a\x0b\x0c
662 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
663\= Expect no match
664    \x09\x{200a}\x{a0}\x{2028}\x0b
665No match
666
667/[\h]/B,utf
668------------------------------------------------------------------
669        Bra
670        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
671        Ket
672        End
673------------------------------------------------------------------
674    >\x{1680}
675 0: \x{1680}
676
677/[\h]{3,}/B,utf
678------------------------------------------------------------------
679        Bra
680        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}+
681        Ket
682        End
683------------------------------------------------------------------
684    >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
685 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
686
687/[\v]/B,utf
688------------------------------------------------------------------
689        Bra
690        [\x0a-\x0d\x85\x{2028}-\x{2029}]
691        Ket
692        End
693------------------------------------------------------------------
694
695/[\H]/B,utf
696------------------------------------------------------------------
697        Bra
698        [\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}]
699        Ket
700        End
701------------------------------------------------------------------
702
703/[\V]/B,utf
704------------------------------------------------------------------
705        Bra
706        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}]
707        Ket
708        End
709------------------------------------------------------------------
710
711/.*$/newline=any,utf
712    \x{1ec5}
713 0: \x{1ec5}
714
715/a\Rb/I,bsr=anycrlf,utf
716Capturing subpattern count = 0
717Options: utf
718\R matches CR, LF, or CRLF
719First code unit = 'a'
720Last code unit = 'b'
721Subject length lower bound = 3
722    a\rb
723 0: a\x{0d}b
724    a\nb
725 0: a\x{0a}b
726    a\r\nb
727 0: a\x{0d}\x{0a}b
728\= Expect no match
729    a\x{85}b
730No match
731    a\x0bb
732No match
733
734/a\Rb/I,bsr=unicode,utf
735Capturing subpattern count = 0
736Options: utf
737\R matches any Unicode newline
738First code unit = 'a'
739Last code unit = 'b'
740Subject length lower bound = 3
741    a\rb
742 0: a\x{0d}b
743    a\nb
744 0: a\x{0a}b
745    a\r\nb
746 0: a\x{0d}\x{0a}b
747    a\x{85}b
748 0: a\x{85}b
749    a\x0bb
750 0: a\x{0b}b
751
752/a\R?b/I,bsr=anycrlf,utf
753Capturing subpattern count = 0
754Options: utf
755\R matches CR, LF, or CRLF
756First code unit = 'a'
757Last code unit = 'b'
758Subject length lower bound = 2
759    a\rb
760 0: a\x{0d}b
761    a\nb
762 0: a\x{0a}b
763    a\r\nb
764 0: a\x{0d}\x{0a}b
765\= Expect no match
766    a\x{85}b
767No match
768    a\x0bb
769No match
770
771/a\R?b/I,bsr=unicode,utf
772Capturing subpattern count = 0
773Options: utf
774\R matches any Unicode newline
775First code unit = 'a'
776Last code unit = 'b'
777Subject length lower bound = 2
778    a\rb
779 0: a\x{0d}b
780    a\nb
781 0: a\x{0a}b
782    a\r\nb
783 0: a\x{0d}\x{0a}b
784    a\x{85}b
785 0: a\x{85}b
786    a\x0bb
787 0: a\x{0b}b
788
789/.*a.*=.b.*/utf,newline=any
790    QQQ\x{2029}ABCaXYZ=!bPQR
791 0: ABCaXYZ=!bPQR
792\= Expect no match
793    a\x{2029}b
794No match
795    \x61\xe2\x80\xa9\x62
796No match
797
798/[[:a\x{100}b:]]/utf
799Failed: error 130 at offset 3: unknown POSIX class name
800
801/a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref
802    a\x{1234}b
803 0: a\x{1234}b
804    a\nb
805 0: a\x{0a}b
806\= Expect no match
807    ab
808No match
809
810/a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref
811    aXb
812 0: aXb
813    a\nX\nX\x{1234}b
814 0: a\x{0a}X\x{0a}X\x{1234}b
815\= Expect no match
816    ab
817No match
818
819/(\x{de})\1/
820    \x{de}\x{de}
821 0: \xde\xde
822 1: \xde
823
824/X/newline=any,utf,firstline
825    A\x{1ec5}ABCXYZ
826 0: X
827
828/Xa{2,4}b/utf
829    X\=ps
830Partial match: X
831    Xa\=ps
832Partial match: Xa
833    Xaa\=ps
834Partial match: Xaa
835    Xaaa\=ps
836Partial match: Xaaa
837    Xaaaa\=ps
838Partial match: Xaaaa
839
840/Xa{2,4}?b/utf
841    X\=ps
842Partial match: X
843    Xa\=ps
844Partial match: Xa
845    Xaa\=ps
846Partial match: Xaa
847    Xaaa\=ps
848Partial match: Xaaa
849    Xaaaa\=ps
850Partial match: Xaaaa
851
852/Xa{2,4}+b/utf
853    X\=ps
854Partial match: X
855    Xa\=ps
856Partial match: Xa
857    Xaa\=ps
858Partial match: Xaa
859    Xaaa\=ps
860Partial match: Xaaa
861    Xaaaa\=ps
862Partial match: Xaaaa
863
864/X\x{123}{2,4}b/utf
865    X\=ps
866Partial match: X
867    X\x{123}\=ps
868Partial match: X\x{123}
869    X\x{123}\x{123}\=ps
870Partial match: X\x{123}\x{123}
871    X\x{123}\x{123}\x{123}\=ps
872Partial match: X\x{123}\x{123}\x{123}
873    X\x{123}\x{123}\x{123}\x{123}\=ps
874Partial match: X\x{123}\x{123}\x{123}\x{123}
875
876/X\x{123}{2,4}?b/utf
877    X\=ps
878Partial match: X
879    X\x{123}\=ps
880Partial match: X\x{123}
881    X\x{123}\x{123}\=ps
882Partial match: X\x{123}\x{123}
883    X\x{123}\x{123}\x{123}\=ps
884Partial match: X\x{123}\x{123}\x{123}
885    X\x{123}\x{123}\x{123}\x{123}\=ps
886Partial match: X\x{123}\x{123}\x{123}\x{123}
887
888/X\x{123}{2,4}+b/utf
889    X\=ps
890Partial match: X
891    X\x{123}\=ps
892Partial match: X\x{123}
893    X\x{123}\x{123}\=ps
894Partial match: X\x{123}\x{123}
895    X\x{123}\x{123}\x{123}\=ps
896Partial match: X\x{123}\x{123}\x{123}
897    X\x{123}\x{123}\x{123}\x{123}\=ps
898Partial match: X\x{123}\x{123}\x{123}\x{123}
899
900/X\x{123}{2,4}b/utf
901\= Expect no match
902    Xx\=ps
903No match
904    X\x{123}x\=ps
905No match
906    X\x{123}\x{123}x\=ps
907No match
908    X\x{123}\x{123}\x{123}x\=ps
909No match
910    X\x{123}\x{123}\x{123}\x{123}x\=ps
911No match
912
913/X\x{123}{2,4}?b/utf
914\= Expect no match
915    Xx\=ps
916No match
917    X\x{123}x\=ps
918No match
919    X\x{123}\x{123}x\=ps
920No match
921    X\x{123}\x{123}\x{123}x\=ps
922No match
923    X\x{123}\x{123}\x{123}\x{123}x\=ps
924No match
925
926/X\x{123}{2,4}+b/utf
927\= Expect no match
928    Xx\=ps
929No match
930    X\x{123}x\=ps
931No match
932    X\x{123}\x{123}x\=ps
933No match
934    X\x{123}\x{123}\x{123}x\=ps
935No match
936    X\x{123}\x{123}\x{123}\x{123}x\=ps
937No match
938
939/X\d{2,4}b/utf
940    X\=ps
941Partial match: X
942    X3\=ps
943Partial match: X3
944    X33\=ps
945Partial match: X33
946    X333\=ps
947Partial match: X333
948    X3333\=ps
949Partial match: X3333
950
951/X\d{2,4}?b/utf
952    X\=ps
953Partial match: X
954    X3\=ps
955Partial match: X3
956    X33\=ps
957Partial match: X33
958    X333\=ps
959Partial match: X333
960    X3333\=ps
961Partial match: X3333
962
963/X\d{2,4}+b/utf
964    X\=ps
965Partial match: X
966    X3\=ps
967Partial match: X3
968    X33\=ps
969Partial match: X33
970    X333\=ps
971Partial match: X333
972    X3333\=ps
973Partial match: X3333
974
975/X\D{2,4}b/utf
976    X\=ps
977Partial match: X
978    Xa\=ps
979Partial match: Xa
980    Xaa\=ps
981Partial match: Xaa
982    Xaaa\=ps
983Partial match: Xaaa
984    Xaaaa\=ps
985Partial match: Xaaaa
986
987/X\D{2,4}?b/utf
988    X\=ps
989Partial match: X
990    Xa\=ps
991Partial match: Xa
992    Xaa\=ps
993Partial match: Xaa
994    Xaaa\=ps
995Partial match: Xaaa
996    Xaaaa\=ps
997Partial match: Xaaaa
998
999/X\D{2,4}+b/utf
1000    X\=ps
1001Partial match: X
1002    Xa\=ps
1003Partial match: Xa
1004    Xaa\=ps
1005Partial match: Xaa
1006    Xaaa\=ps
1007Partial match: Xaaa
1008    Xaaaa\=ps
1009Partial match: Xaaaa
1010
1011/X\D{2,4}b/utf
1012    X\=ps
1013Partial match: X
1014    X\x{123}\=ps
1015Partial match: X\x{123}
1016    X\x{123}\x{123}\=ps
1017Partial match: X\x{123}\x{123}
1018    X\x{123}\x{123}\x{123}\=ps
1019Partial match: X\x{123}\x{123}\x{123}
1020    X\x{123}\x{123}\x{123}\x{123}\=ps
1021Partial match: X\x{123}\x{123}\x{123}\x{123}
1022
1023/X\D{2,4}?b/utf
1024    X\=ps
1025Partial match: X
1026    X\x{123}\=ps
1027Partial match: X\x{123}
1028    X\x{123}\x{123}\=ps
1029Partial match: X\x{123}\x{123}
1030    X\x{123}\x{123}\x{123}\=ps
1031Partial match: X\x{123}\x{123}\x{123}
1032    X\x{123}\x{123}\x{123}\x{123}\=ps
1033Partial match: X\x{123}\x{123}\x{123}\x{123}
1034
1035/X\D{2,4}+b/utf
1036    X\=ps
1037Partial match: X
1038    X\x{123}\=ps
1039Partial match: X\x{123}
1040    X\x{123}\x{123}\=ps
1041Partial match: X\x{123}\x{123}
1042    X\x{123}\x{123}\x{123}\=ps
1043Partial match: X\x{123}\x{123}\x{123}
1044    X\x{123}\x{123}\x{123}\x{123}\=ps
1045Partial match: X\x{123}\x{123}\x{123}\x{123}
1046
1047/X[abc]{2,4}b/utf
1048    X\=ps
1049Partial match: X
1050    Xa\=ps
1051Partial match: Xa
1052    Xaa\=ps
1053Partial match: Xaa
1054    Xaaa\=ps
1055Partial match: Xaaa
1056    Xaaaa\=ps
1057Partial match: Xaaaa
1058
1059/X[abc]{2,4}?b/utf
1060    X\=ps
1061Partial match: X
1062    Xa\=ps
1063Partial match: Xa
1064    Xaa\=ps
1065Partial match: Xaa
1066    Xaaa\=ps
1067Partial match: Xaaa
1068    Xaaaa\=ps
1069Partial match: Xaaaa
1070
1071/X[abc]{2,4}+b/utf
1072    X\=ps
1073Partial match: X
1074    Xa\=ps
1075Partial match: Xa
1076    Xaa\=ps
1077Partial match: Xaa
1078    Xaaa\=ps
1079Partial match: Xaaa
1080    Xaaaa\=ps
1081Partial match: Xaaaa
1082
1083/X[abc\x{123}]{2,4}b/utf
1084    X\=ps
1085Partial match: X
1086    X\x{123}\=ps
1087Partial match: X\x{123}
1088    X\x{123}\x{123}\=ps
1089Partial match: X\x{123}\x{123}
1090    X\x{123}\x{123}\x{123}\=ps
1091Partial match: X\x{123}\x{123}\x{123}
1092    X\x{123}\x{123}\x{123}\x{123}\=ps
1093Partial match: X\x{123}\x{123}\x{123}\x{123}
1094
1095/X[abc\x{123}]{2,4}?b/utf
1096    X\=ps
1097Partial match: X
1098    X\x{123}\=ps
1099Partial match: X\x{123}
1100    X\x{123}\x{123}\=ps
1101Partial match: X\x{123}\x{123}
1102    X\x{123}\x{123}\x{123}\=ps
1103Partial match: X\x{123}\x{123}\x{123}
1104    X\x{123}\x{123}\x{123}\x{123}\=ps
1105Partial match: X\x{123}\x{123}\x{123}\x{123}
1106
1107/X[abc\x{123}]{2,4}+b/utf
1108    X\=ps
1109Partial match: X
1110    X\x{123}\=ps
1111Partial match: X\x{123}
1112    X\x{123}\x{123}\=ps
1113Partial match: X\x{123}\x{123}
1114    X\x{123}\x{123}\x{123}\=ps
1115Partial match: X\x{123}\x{123}\x{123}
1116    X\x{123}\x{123}\x{123}\x{123}\=ps
1117Partial match: X\x{123}\x{123}\x{123}\x{123}
1118
1119/X[^a]{2,4}b/utf
1120    X\=ps
1121Partial match: X
1122    Xz\=ps
1123Partial match: Xz
1124    Xzz\=ps
1125Partial match: Xzz
1126    Xzzz\=ps
1127Partial match: Xzzz
1128    Xzzzz\=ps
1129Partial match: Xzzzz
1130
1131/X[^a]{2,4}?b/utf
1132    X\=ps
1133Partial match: X
1134    Xz\=ps
1135Partial match: Xz
1136    Xzz\=ps
1137Partial match: Xzz
1138    Xzzz\=ps
1139Partial match: Xzzz
1140    Xzzzz\=ps
1141Partial match: Xzzzz
1142
1143/X[^a]{2,4}+b/utf
1144    X\=ps
1145Partial match: X
1146    Xz\=ps
1147Partial match: Xz
1148    Xzz\=ps
1149Partial match: Xzz
1150    Xzzz\=ps
1151Partial match: Xzzz
1152    Xzzzz\=ps
1153Partial match: Xzzzz
1154
1155/X[^a]{2,4}b/utf
1156    X\=ps
1157Partial match: X
1158    X\x{123}\=ps
1159Partial match: X\x{123}
1160    X\x{123}\x{123}\=ps
1161Partial match: X\x{123}\x{123}
1162    X\x{123}\x{123}\x{123}\=ps
1163Partial match: X\x{123}\x{123}\x{123}
1164    X\x{123}\x{123}\x{123}\x{123}\=ps
1165Partial match: X\x{123}\x{123}\x{123}\x{123}
1166
1167/X[^a]{2,4}?b/utf
1168    X\=ps
1169Partial match: X
1170    X\x{123}\=ps
1171Partial match: X\x{123}
1172    X\x{123}\x{123}\=ps
1173Partial match: X\x{123}\x{123}
1174    X\x{123}\x{123}\x{123}\=ps
1175Partial match: X\x{123}\x{123}\x{123}
1176    X\x{123}\x{123}\x{123}\x{123}\=ps
1177Partial match: X\x{123}\x{123}\x{123}\x{123}
1178
1179/X[^a]{2,4}+b/utf
1180    X\=ps
1181Partial match: X
1182    X\x{123}\=ps
1183Partial match: X\x{123}
1184    X\x{123}\x{123}\=ps
1185Partial match: X\x{123}\x{123}
1186    X\x{123}\x{123}\x{123}\=ps
1187Partial match: X\x{123}\x{123}\x{123}
1188    X\x{123}\x{123}\x{123}\x{123}\=ps
1189Partial match: X\x{123}\x{123}\x{123}\x{123}
1190
1191/(Y)X\1{2,4}b/utf
1192    YX\=ps
1193Partial match: YX
1194    YXY\=ps
1195Partial match: YXY
1196    YXYY\=ps
1197Partial match: YXYY
1198    YXYYY\=ps
1199Partial match: YXYYY
1200    YXYYYY\=ps
1201Partial match: YXYYYY
1202
1203/(Y)X\1{2,4}?b/utf
1204    YX\=ps
1205Partial match: YX
1206    YXY\=ps
1207Partial match: YXY
1208    YXYY\=ps
1209Partial match: YXYY
1210    YXYYY\=ps
1211Partial match: YXYYY
1212    YXYYYY\=ps
1213Partial match: YXYYYY
1214
1215/(Y)X\1{2,4}+b/utf
1216    YX\=ps
1217Partial match: YX
1218    YXY\=ps
1219Partial match: YXY
1220    YXYY\=ps
1221Partial match: YXYY
1222    YXYYY\=ps
1223Partial match: YXYYY
1224    YXYYYY\=ps
1225Partial match: YXYYYY
1226
1227/(\x{123})X\1{2,4}b/utf
1228    \x{123}X\=ps
1229Partial match: \x{123}X
1230    \x{123}X\x{123}\=ps
1231Partial match: \x{123}X\x{123}
1232    \x{123}X\x{123}\x{123}\=ps
1233Partial match: \x{123}X\x{123}\x{123}
1234    \x{123}X\x{123}\x{123}\x{123}\=ps
1235Partial match: \x{123}X\x{123}\x{123}\x{123}
1236    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1237Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1238
1239/(\x{123})X\1{2,4}?b/utf
1240    \x{123}X\=ps
1241Partial match: \x{123}X
1242    \x{123}X\x{123}\=ps
1243Partial match: \x{123}X\x{123}
1244    \x{123}X\x{123}\x{123}\=ps
1245Partial match: \x{123}X\x{123}\x{123}
1246    \x{123}X\x{123}\x{123}\x{123}\=ps
1247Partial match: \x{123}X\x{123}\x{123}\x{123}
1248    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1249Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1250
1251/(\x{123})X\1{2,4}+b/utf
1252    \x{123}X\=ps
1253Partial match: \x{123}X
1254    \x{123}X\x{123}\=ps
1255Partial match: \x{123}X\x{123}
1256    \x{123}X\x{123}\x{123}\=ps
1257Partial match: \x{123}X\x{123}\x{123}
1258    \x{123}X\x{123}\x{123}\x{123}\=ps
1259Partial match: \x{123}X\x{123}\x{123}\x{123}
1260    \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1261Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
1262
1263/\bthe cat\b/utf
1264    the cat\=ps
1265 0: the cat
1266    the cat\=ph
1267Partial match: the cat
1268
1269/abcd*/utf
1270    xxxxabcd\=ps
1271 0: abcd
1272    xxxxabcd\=ph
1273Partial match: abcd
1274
1275/abcd*/i,utf
1276    xxxxabcd\=ps
1277 0: abcd
1278    xxxxabcd\=ph
1279Partial match: abcd
1280    XXXXABCD\=ps
1281 0: ABCD
1282    XXXXABCD\=ph
1283Partial match: ABCD
1284
1285/abc\d*/utf
1286    xxxxabc1\=ps
1287 0: abc1
1288    xxxxabc1\=ph
1289Partial match: abc1
1290
1291/(a)bc\1*/utf
1292    xxxxabca\=ps
1293 0: abca
1294 1: a
1295    xxxxabca\=ph
1296Partial match: abca
1297
1298/abc[de]*/utf
1299    xxxxabcde\=ps
1300 0: abcde
1301    xxxxabcde\=ph
1302Partial match: abcde
1303
1304/X\W{3}X/utf
1305    X\=ps
1306Partial match: X
1307
1308/\sxxx\s/utf,tables=2
1309    AB\x{85}xxx\x{a0}XYZ
1310 0: \x{85}xxx\x{a0}
1311    AB\x{a0}xxx\x{85}XYZ
1312 0: \x{a0}xxx\x{85}
1313
1314/\S \S/utf,tables=2
1315    \x{a2} \x{84}
1316 0: \x{a2} \x{84}
1317
1318'A#хц'Bx,newline=any,utf
1319------------------------------------------------------------------
1320        Bra
1321        A
1322        Ket
1323        End
1324------------------------------------------------------------------
1325
1326'A#хц
1327  PQ'Bx,newline=any,utf
1328------------------------------------------------------------------
1329        Bra
1330        APQ
1331        Ket
1332        End
1333------------------------------------------------------------------
1334
1335/a+#хaa
1336  z#XX?/Bx,newline=any,utf
1337------------------------------------------------------------------
1338        Bra
1339        a++
1340        z
1341        Ket
1342        End
1343------------------------------------------------------------------
1344
1345/a+#хaa
1346  z#х?/Bx,newline=any,utf
1347------------------------------------------------------------------
1348        Bra
1349        a++
1350        z
1351        Ket
1352        End
1353------------------------------------------------------------------
1354
1355/\g{A}xxx#bXX(?'A'123)
1356(?'A'456)/Bx,newline=any,utf
1357------------------------------------------------------------------
1358        Bra
1359        \1
1360        xxx
1361        CBra 1
1362        456
1363        Ket
1364        Ket
1365        End
1366------------------------------------------------------------------
1367
1368/\g{A}xxx#bх(?'A'123)
1369(?'A'456)/Bx,newline=any,utf
1370------------------------------------------------------------------
1371        Bra
1372        \1
1373        xxx
1374        CBra 1
1375        456
1376        Ket
1377        Ket
1378        End
1379------------------------------------------------------------------
1380
1381/^\cģ/utf
1382Failed: error 168 at offset 3: \c must be followed by a printable ASCII character
1383
1384/(\R*)(.)/s,utf
1385    \r\n
1386 0: \x{0d}
1387 1:
1388 2: \x{0d}
1389    \r\r\n\n\r
1390 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1391 1: \x{0d}\x{0d}\x{0a}\x{0a}
1392 2: \x{0d}
1393    \r\r\n\n\r\n
1394 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1395 1: \x{0d}\x{0d}\x{0a}\x{0a}
1396 2: \x{0d}
1397
1398/(\R)*(.)/s,utf
1399    \r\n
1400 0: \x{0d}
1401 1: <unset>
1402 2: \x{0d}
1403    \r\r\n\n\r
1404 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1405 1: \x{0a}
1406 2: \x{0d}
1407    \r\r\n\n\r\n
1408 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1409 1: \x{0a}
1410 2: \x{0d}
1411
1412/[^\x{1234}]+/Ii,utf
1413Capturing subpattern count = 0
1414Options: caseless utf
1415Subject length lower bound = 1
1416
1417/[^\x{1234}]+?/Ii,utf
1418Capturing subpattern count = 0
1419Options: caseless utf
1420Subject length lower bound = 1
1421
1422/[^\x{1234}]++/Ii,utf
1423Capturing subpattern count = 0
1424Options: caseless utf
1425Subject length lower bound = 1
1426
1427/[^\x{1234}]{2}/Ii,utf
1428Capturing subpattern count = 0
1429Options: caseless utf
1430Subject length lower bound = 2
1431
1432/f.*/
1433    for\=ph
1434Partial match: for
1435
1436/f.*/s
1437    for\=ph
1438Partial match: for
1439
1440/f.*/utf
1441    for\=ph
1442Partial match: for
1443
1444/f.*/s,utf
1445    for\=ph
1446Partial match: for
1447
1448/\x{d7ff}\x{e000}/utf
1449
1450/\x{d800}/utf
1451Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1452
1453/\x{dfff}/utf
1454Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1455
1456/\h+/utf
1457    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1458 0: \x{1680}\x{2000}\x{202f}\x{3000}
1459    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1460 0: \x{200a}\x{a0}\x{2000}
1461
1462/[\h\x{e000}]+/B,utf
1463------------------------------------------------------------------
1464        Bra
1465        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]++
1466        Ket
1467        End
1468------------------------------------------------------------------
1469    \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1470 0: \x{1680}\x{2000}\x{202f}\x{3000}
1471    \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1472 0: \x{200a}\x{a0}\x{2000}
1473
1474/\H+/utf
1475    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1476 0: \x{167f}\x{1681}\x{180d}\x{180f}
1477    \x{2000}\x{200a}\x{1fff}\x{200b}
1478 0: \x{1fff}\x{200b}
1479    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1480 0: \x{202e}\x{2030}\x{205e}\x{2060}
1481    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1482 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1483
1484/[\H\x{d7ff}]+/B,utf
1485------------------------------------------------------------------
1486        Bra
1487        [\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}]++
1488        Ket
1489        End
1490------------------------------------------------------------------
1491    \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1492 0: \x{167f}\x{1681}\x{180d}\x{180f}
1493    \x{2000}\x{200a}\x{1fff}\x{200b}
1494 0: \x{1fff}\x{200b}
1495    \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1496 0: \x{202e}\x{2030}\x{205e}\x{2060}
1497    \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1498 0: \x{9f}\x{a1}\x{2fff}\x{3001}
1499
1500/\v+/utf
1501    \x{2027}\x{2030}\x{2028}\x{2029}
1502 0: \x{2028}\x{2029}
1503    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1504 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1505
1506/[\v\x{e000}]+/B,utf
1507------------------------------------------------------------------
1508        Bra
1509        [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]++
1510        Ket
1511        End
1512------------------------------------------------------------------
1513    \x{2027}\x{2030}\x{2028}\x{2029}
1514 0: \x{2028}\x{2029}
1515    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1516 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1517
1518/\V+/utf
1519    \x{2028}\x{2029}\x{2027}\x{2030}
1520 0: \x{2027}\x{2030}
1521    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1522 0: \x{09}\x{0e}\x{84}\x{86}
1523
1524/[\V\x{d7ff}]+/B,utf
1525------------------------------------------------------------------
1526        Bra
1527        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]++
1528        Ket
1529        End
1530------------------------------------------------------------------
1531    \x{2028}\x{2029}\x{2027}\x{2030}
1532 0: \x{2027}\x{2030}
1533    \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1534 0: \x{09}\x{0e}\x{84}\x{86}
1535
1536/\R+/bsr=unicode,utf
1537    \x{2027}\x{2030}\x{2028}\x{2029}
1538 0: \x{2028}\x{2029}
1539    \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1540 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1541
1542/(..)\1/utf
1543    ab\=ps
1544Partial match: ab
1545    aba\=ps
1546Partial match: aba
1547    abab\=ps
1548 0: abab
1549 1: ab
1550
1551/(..)\1/i,utf
1552    ab\=ps
1553Partial match: ab
1554    abA\=ps
1555Partial match: abA
1556    aBAb\=ps
1557 0: aBAb
1558 1: aB
1559
1560/(..)\1{2,}/utf
1561    ab\=ps
1562Partial match: ab
1563    aba\=ps
1564Partial match: aba
1565    abab\=ps
1566Partial match: abab
1567    ababa\=ps
1568Partial match: ababa
1569    ababab\=ps
1570 0: ababab
1571 1: ab
1572    ababab\=ph
1573Partial match: ababab
1574    abababa\=ps
1575 0: ababab
1576 1: ab
1577    abababa\=ph
1578Partial match: abababa
1579
1580/(..)\1{2,}/i,utf
1581    ab\=ps
1582Partial match: ab
1583    aBa\=ps
1584Partial match: aBa
1585    aBAb\=ps
1586Partial match: aBAb
1587    AbaBA\=ps
1588Partial match: AbaBA
1589    abABAb\=ps
1590 0: abABAb
1591 1: ab
1592    aBAbaB\=ph
1593Partial match: aBAbaB
1594    abABabA\=ps
1595 0: abABab
1596 1: ab
1597    abaBABa\=ph
1598Partial match: abaBABa
1599
1600/(..)\1{2,}?x/i,utf
1601    ab\=ps
1602Partial match: ab
1603    abA\=ps
1604Partial match: abA
1605    aBAb\=ps
1606Partial match: aBAb
1607    abaBA\=ps
1608Partial match: abaBA
1609    abAbaB\=ps
1610Partial match: abAbaB
1611    abaBabA\=ps
1612Partial match: abaBabA
1613    abAbABaBx\=ps
1614 0: abAbABaBx
1615 1: ab
1616
1617/./utf,newline=crlf
1618    \r\=ps
1619 0: \x{0d}
1620    \r\=ph
1621Partial match: \x{0d}
1622
1623/.{2,3}/utf,newline=crlf
1624    \r\=ps
1625Partial match: \x{0d}
1626    \r\=ph
1627Partial match: \x{0d}
1628    \r\r\=ps
1629 0: \x{0d}\x{0d}
1630    \r\r\=ph
1631Partial match: \x{0d}\x{0d}
1632    \r\r\r\=ps
1633 0: \x{0d}\x{0d}\x{0d}
1634    \r\r\r\=ph
1635Partial match: \x{0d}\x{0d}\x{0d}
1636
1637/.{2,3}?/utf,newline=crlf
1638    \r\=ps
1639Partial match: \x{0d}
1640    \r\=ph
1641Partial match: \x{0d}
1642    \r\r\=ps
1643 0: \x{0d}\x{0d}
1644    \r\r\=ph
1645Partial match: \x{0d}\x{0d}
1646    \r\r\r\=ps
1647 0: \x{0d}\x{0d}
1648    \r\r\r\=ph
1649 0: \x{0d}\x{0d}
1650
1651/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/B,utf
1652------------------------------------------------------------------
1653        Bra
1654        [^\x{100}]
1655        [^\x{1234}]
1656        [^\x{ffff}]
1657        [^\x{10000}]
1658        [^\x{10ffff}]
1659        Ket
1660        End
1661------------------------------------------------------------------
1662
1663/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/Bi,utf
1664------------------------------------------------------------------
1665        Bra
1666     /i [^\x{100}]
1667     /i [^\x{1234}]
1668     /i [^\x{ffff}]
1669     /i [^\x{10000}]
1670     /i [^\x{10ffff}]
1671        Ket
1672        End
1673------------------------------------------------------------------
1674
1675/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/B,utf
1676------------------------------------------------------------------
1677        Bra
1678        [^\x{100}]*
1679        [^\x{10000}]+
1680        [^\x{10ffff}]??
1681        [^\x{8000}]{4}
1682        [^\x{8000}]*
1683        [^\x{7fff}]{2}
1684        [^\x{7fff}]{0,7}?
1685        [^\x{fffff}]{5}
1686        [^\x{fffff}]?+
1687        Ket
1688        End
1689------------------------------------------------------------------
1690
1691/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/Bi,utf
1692------------------------------------------------------------------
1693        Bra
1694     /i [^\x{100}]*
1695     /i [^\x{10000}]+
1696     /i [^\x{10ffff}]??
1697     /i [^\x{8000}]{4}
1698     /i [^\x{8000}]*
1699     /i [^\x{7fff}]{2}
1700     /i [^\x{7fff}]{0,7}?
1701     /i [^\x{fffff}]{5}
1702     /i [^\x{fffff}]?+
1703        Ket
1704        End
1705------------------------------------------------------------------
1706
1707/(?<=\x{1234}\x{1234})\bxy/I,utf
1708Capturing subpattern count = 0
1709Max lookbehind = 2
1710Options: utf
1711First code unit = 'x'
1712Last code unit = 'y'
1713Subject length lower bound = 2
1714
1715/(?<!^)ETA/utf
1716\= Expect no match
1717    ETA
1718No match
1719
1720/\u0100/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1721------------------------------------------------------------------
1722        Bra
1723        \x{100}
1724        Ket
1725        End
1726------------------------------------------------------------------
1727
1728/[\u0100-\u0200]/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1729------------------------------------------------------------------
1730        Bra
1731        [\x{100}-\x{200}]
1732        Ket
1733        End
1734------------------------------------------------------------------
1735
1736/\ud800/utf,alt_bsux,allow_empty_class,match_unset_backref
1737Failed: error 173 at offset 6: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1738
1739/^a+[a\x{200}]/B,utf
1740------------------------------------------------------------------
1741        Bra
1742        ^
1743        a+
1744        [a\x{200}]
1745        Ket
1746        End
1747------------------------------------------------------------------
1748    aa
1749 0: aa
1750
1751/[b-d\x{200}-\x{250}]*[ae-h]?#[\x{200}-\x{250}]{0,8}[\x00-\xff]*#[\x{200}-\x{250}]+[a-z]/B,utf
1752------------------------------------------------------------------
1753        Bra
1754        [b-d\x{200}-\x{250}]*+
1755        [ae-h]?+
1756        #
1757        [\x{200}-\x{250}]{0,8}+
1758        [\x00-\xff]*
1759        #
1760        [\x{200}-\x{250}]++
1761        [a-z]
1762        Ket
1763        End
1764------------------------------------------------------------------
1765
1766/[\p{L}]/IB
1767------------------------------------------------------------------
1768        Bra
1769        [\p{L}]
1770        Ket
1771        End
1772------------------------------------------------------------------
1773Capturing subpattern count = 0
1774Subject length lower bound = 1
1775
1776/[\p{^L}]/IB
1777------------------------------------------------------------------
1778        Bra
1779        [\P{L}]
1780        Ket
1781        End
1782------------------------------------------------------------------
1783Capturing subpattern count = 0
1784Subject length lower bound = 1
1785
1786/[\P{L}]/IB
1787------------------------------------------------------------------
1788        Bra
1789        [\P{L}]
1790        Ket
1791        End
1792------------------------------------------------------------------
1793Capturing subpattern count = 0
1794Subject length lower bound = 1
1795
1796/[\P{^L}]/IB
1797------------------------------------------------------------------
1798        Bra
1799        [\p{L}]
1800        Ket
1801        End
1802------------------------------------------------------------------
1803Capturing subpattern count = 0
1804Subject length lower bound = 1
1805
1806/[abc\p{L}\x{0660}]/IB,utf
1807------------------------------------------------------------------
1808        Bra
1809        [a-c\p{L}\x{660}]
1810        Ket
1811        End
1812------------------------------------------------------------------
1813Capturing subpattern count = 0
1814Options: utf
1815Subject length lower bound = 1
1816
1817/[\p{Nd}]/IB,utf
1818------------------------------------------------------------------
1819        Bra
1820        [\p{Nd}]
1821        Ket
1822        End
1823------------------------------------------------------------------
1824Capturing subpattern count = 0
1825Options: utf
1826Subject length lower bound = 1
1827    1234
1828 0: 1
1829
1830/[\p{Nd}+-]+/IB,utf
1831------------------------------------------------------------------
1832        Bra
1833        [+\-\p{Nd}]++
1834        Ket
1835        End
1836------------------------------------------------------------------
1837Capturing subpattern count = 0
1838Options: utf
1839Subject length lower bound = 1
1840    1234
1841 0: 1234
1842    12-34
1843 0: 12-34
1844    12+\x{661}-34
1845 0: 12+\x{661}-34
1846\= Expect no match
1847    abcd
1848No match
1849
1850/(?:[\PPa*]*){8,}/
1851
1852/[\P{Any}]/B
1853------------------------------------------------------------------
1854        Bra
1855        [\P{Any}]
1856        Ket
1857        End
1858------------------------------------------------------------------
1859
1860/[\P{Any}\E]/B
1861------------------------------------------------------------------
1862        Bra
1863        [\P{Any}]
1864        Ket
1865        End
1866------------------------------------------------------------------
1867
1868/(\P{Yi}+\277)/
1869
1870/(\P{Yi}+\277)?/
1871
1872/(?<=\P{Yi}{3}A)X/
1873
1874/\p{Yi}+(\P{Yi}+)(?1)/
1875
1876/(\P{Yi}{2}\277)?/
1877
1878/[\P{Yi}A]/
1879
1880/[\P{Yi}\P{Yi}\P{Yi}A]/
1881
1882/[^\P{Yi}A]/
1883
1884/[^\P{Yi}\P{Yi}\P{Yi}A]/
1885
1886/(\P{Yi}*\277)*/
1887
1888/(\P{Yi}*?\277)*/
1889
1890/(\p{Yi}*+\277)*/
1891
1892/(\P{Yi}?\277)*/
1893
1894/(\P{Yi}??\277)*/
1895
1896/(\p{Yi}?+\277)*/
1897
1898/(\P{Yi}{0,3}\277)*/
1899
1900/(\P{Yi}{0,3}?\277)*/
1901
1902/(\p{Yi}{0,3}+\277)*/
1903
1904/\p{Zl}{2,3}+/B,utf
1905------------------------------------------------------------------
1906        Bra
1907        prop Zl {2}
1908        prop Zl ?+
1909        Ket
1910        End
1911------------------------------------------------------------------
1912    


1913 0: \x{2028}\x{2028}
1914    \x{2028}\x{2028}\x{2028}
1915 0: \x{2028}\x{2028}\x{2028}
1916
1917/\p{Zl}/B,utf
1918------------------------------------------------------------------
1919        Bra
1920        prop Zl
1921        Ket
1922        End
1923------------------------------------------------------------------
1924
1925/\p{Lu}{3}+/B,utf
1926------------------------------------------------------------------
1927        Bra
1928        prop Lu {3}
1929        Ket
1930        End
1931------------------------------------------------------------------
1932
1933/\pL{2}+/B,utf
1934------------------------------------------------------------------
1935        Bra
1936        prop L {2}
1937        Ket
1938        End
1939------------------------------------------------------------------
1940
1941/\p{Cc}{2}+/B,utf
1942------------------------------------------------------------------
1943        Bra
1944        prop Cc {2}
1945        Ket
1946        End
1947------------------------------------------------------------------
1948
1949/^\p{Cf}/utf
1950    \x{180e}
1951 0: \x{180e}
1952    \x{061c}
1953 0: \x{61c}
1954    \x{2066}
1955 0: \x{2066}
1956    \x{2067}
1957 0: \x{2067}
1958    \x{2068}
1959 0: \x{2068}
1960    \x{2069}
1961 0: \x{2069}
1962
1963/^\p{Cs}/utf
1964    \x{dfff}\=no_utf_check
1965 0: \x{dfff}
1966\= Expect no match
1967    \x{09f}
1968No match
1969
1970/^\p{Mn}/utf
1971    \x{1a1b}
1972 0: \x{1a1b}
1973
1974/^\p{Pe}/utf
1975    \x{2309}
1976 0: \x{2309}
1977    \x{230b}
1978 0: \x{230b}
1979
1980/^\p{Ps}/utf
1981    \x{2308}
1982 0: \x{2308}
1983    \x{230a}
1984 0: \x{230a}
1985
1986/^\p{Sc}+/utf
1987    $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
1988 0: $\x{a2}\x{a3}\x{a4}\x{a5}
1989    \x{9f2}
1990 0: \x{9f2}
1991\= Expect no match
1992    X
1993No match
1994    \x{2c2}
1995No match
1996
1997/^\p{Zs}/utf
1998    \ \
1999 0:
2000    \x{a0}
2001 0: \x{a0}
2002    \x{1680}
2003 0: \x{1680}
2004    \x{2000}
2005 0: \x{2000}
2006    \x{2001}
2007 0: \x{2001}
2008\= Expect no match
2009    \x{2028}
2010No match
2011    \x{200d}
2012No match
2013
2014# These are here because Perl has problems with the negative versions of the
2015# properties and has changed how it behaves for caseless matching.
2016
2017/\p{^Lu}/i,utf
2018    1234
2019 0: 1
2020\= Expect no match
2021    ABC
2022No match
2023
2024/\P{Lu}/i,utf
2025    1234
2026 0: 1
2027\= Expect no match
2028    ABC
2029No match
2030
2031/\p{Ll}/i,utf
2032    a
2033 0: a
2034    Az
2035 0: z
2036\= Expect no match
2037    ABC
2038No match
2039
2040/\p{Lu}/i,utf
2041    A
2042 0: A
2043    a\x{10a0}B
2044 0: \x{10a0}
2045\= Expect no match
2046    a
2047No match
2048    \x{1d00}
2049No match
2050
2051/\p{Lu}/i,utf
2052    A
2053 0: A
2054    aZ
2055 0: Z
2056\= Expect no match
2057    abc
2058No match
2059
2060/[\x{c0}\x{391}]/i,utf
2061    \x{c0}
2062 0: \x{c0}
2063    \x{e0}
2064 0: \x{e0}
2065
2066# The next two are special cases where the lengths of the different cases of
2067# the same character differ. The first went wrong with heap frame storage; the
2068# second was broken in all cases.
2069
2070/^\x{023a}+?(\x{0130}+)/i,utf
2071  \x{023a}\x{2c65}\x{0130}
2072 0: \x{23a}\x{2c65}\x{130}
2073 1: \x{130}
2074
2075/^\x{023a}+([^X])/i,utf
2076  \x{023a}\x{2c65}X
2077 0: \x{23a}\x{2c65}
2078 1: \x{2c65}
2079
2080/\x{c0}+\x{116}+/i,utf
2081    \x{c0}\x{e0}\x{116}\x{117}
2082 0: \x{c0}\x{e0}\x{116}\x{117}
2083
2084/[\x{c0}\x{116}]+/i,utf
2085    \x{c0}\x{e0}\x{116}\x{117}
2086 0: \x{c0}\x{e0}\x{116}\x{117}
2087
2088/(\x{de})\1/i,utf
2089    \x{de}\x{de}
2090 0: \x{de}\x{de}
2091 1: \x{de}
2092    \x{de}\x{fe}
2093 0: \x{de}\x{fe}
2094 1: \x{de}
2095    \x{fe}\x{fe}
2096 0: \x{fe}\x{fe}
2097 1: \x{fe}
2098    \x{fe}\x{de}
2099 0: \x{fe}\x{de}
2100 1: \x{fe}
2101
2102/^\x{c0}$/i,utf
2103    \x{c0}
2104 0: \x{c0}
2105    \x{e0}
2106 0: \x{e0}
2107
2108/^\x{e0}$/i,utf
2109    \x{c0}
2110 0: \x{c0}
2111    \x{e0}
2112 0: \x{e0}
2113
2114# The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
2115# will match it only with UCP support, because without that it has no notion
2116# of case for anything other than the ASCII letters.
2117
2118/((?i)[\x{c0}])/utf
2119    \x{c0}
2120 0: \x{c0}
2121 1: \x{c0}
2122    \x{e0}
2123 0: \x{e0}
2124 1: \x{e0}
2125
2126/(?i:[\x{c0}])/utf
2127    \x{c0}
2128 0: \x{c0}
2129    \x{e0}
2130 0: \x{e0}
2131
2132# These are PCRE's extra properties to help with Unicodizing \d etc.
2133
2134/^\p{Xan}/utf
2135    ABCD
2136 0: A
2137    1234
2138 0: 1
2139    \x{6ca}
2140 0: \x{6ca}
2141    \x{a6c}
2142 0: \x{a6c}
2143    \x{10a7}
2144 0: \x{10a7}
2145\= Expect no match
2146    _ABC
2147No match
2148
2149/^\p{Xan}+/utf
2150    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2151 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2152\= Expect no match
2153    _ABC
2154No match
2155
2156/^\p{Xan}+?/utf
2157    \x{6ca}\x{a6c}\x{10a7}_
2158 0: \x{6ca}
2159
2160/^\p{Xan}*/utf
2161    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2162 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2163
2164/^\p{Xan}{2,9}/utf
2165    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2166 0: ABCD1234\x{6ca}
2167
2168/^\p{Xan}{2,9}?/utf
2169    \x{6ca}\x{a6c}\x{10a7}_
2170 0: \x{6ca}\x{a6c}
2171
2172/^[\p{Xan}]/utf
2173    ABCD1234_
2174 0: A
2175    1234abcd_
2176 0: 1
2177    \x{6ca}
2178 0: \x{6ca}
2179    \x{a6c}
2180 0: \x{a6c}
2181    \x{10a7}
2182 0: \x{10a7}
2183\= Expect no match
2184    _ABC
2185No match
2186
2187/^[\p{Xan}]+/utf
2188    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2189 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
2190\= Expect no match
2191    _ABC
2192No match
2193
2194/^>\p{Xsp}/utf
2195    >\x{1680}\x{2028}\x{0b}
2196 0: >\x{1680}
2197    >\x{a0}
2198 0: >\x{a0}
2199\= Expect no match
2200    \x{0b}
2201No match
2202
2203/^>\p{Xsp}+/utf
2204    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2205 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2206
2207/^>\p{Xsp}+?/utf
2208    >\x{1680}\x{2028}\x{0b}
2209 0: >\x{1680}
2210
2211/^>\p{Xsp}*/utf
2212    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2213 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2214
2215/^>\p{Xsp}{2,9}/utf
2216    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2217 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2218
2219/^>\p{Xsp}{2,9}?/utf
2220    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2221 0: > \x{09}
2222
2223/^>[\p{Xsp}]/utf
2224    >\x{2028}\x{0b}
2225 0: >\x{2028}
2226
2227/^>[\p{Xsp}]+/utf
2228    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2229 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2230
2231/^>\p{Xps}/utf
2232    >\x{1680}\x{2028}\x{0b}
2233 0: >\x{1680}
2234    >\x{a0}
2235 0: >\x{a0}
2236\= Expect no match
2237    \x{0b}
2238No match
2239
2240/^>\p{Xps}+/utf
2241    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2242 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2243
2244/^>\p{Xps}+?/utf
2245    >\x{1680}\x{2028}\x{0b}
2246 0: >\x{1680}
2247
2248/^>\p{Xps}*/utf
2249    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2250 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2251
2252/^>\p{Xps}{2,9}/utf
2253    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2254 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2255
2256/^>\p{Xps}{2,9}?/utf
2257    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2258 0: > \x{09}
2259
2260/^>[\p{Xps}]/utf
2261    >\x{2028}\x{0b}
2262 0: >\x{2028}
2263
2264/^>[\p{Xps}]+/utf
2265    > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2266 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
2267
2268/^\p{Xwd}/utf
2269    ABCD
2270 0: A
2271    1234
2272 0: 1
2273    \x{6ca}
2274 0: \x{6ca}
2275    \x{a6c}
2276 0: \x{a6c}
2277    \x{10a7}
2278 0: \x{10a7}
2279    _ABC
2280 0: _
2281\= Expect no match
2282    []
2283No match
2284
2285/^\p{Xwd}+/utf
2286    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2287 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2288
2289/^\p{Xwd}+?/utf
2290    \x{6ca}\x{a6c}\x{10a7}_
2291 0: \x{6ca}
2292
2293/^\p{Xwd}*/utf
2294    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2295 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2296
2297/^\p{Xwd}{2,9}/utf
2298    A_B12\x{6ca}\x{a6c}\x{10a7}
2299 0: A_B12\x{6ca}\x{a6c}\x{10a7}
2300
2301/^\p{Xwd}{2,9}?/utf
2302    \x{6ca}\x{a6c}\x{10a7}_
2303 0: \x{6ca}\x{a6c}
2304
2305/^[\p{Xwd}]/utf
2306    ABCD1234_
2307 0: A
2308    1234abcd_
2309 0: 1
2310    \x{6ca}
2311 0: \x{6ca}
2312    \x{a6c}
2313 0: \x{a6c}
2314    \x{10a7}
2315 0: \x{10a7}
2316    _ABC
2317 0: _
2318\= Expect no match
2319    []
2320No match
2321
2322/^[\p{Xwd}]+/utf
2323    ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2324 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
2325
2326# A check not in UTF-8 mode
2327
2328/^[\p{Xwd}]+/
2329    ABCD1234_
2330 0: ABCD1234_
2331
2332# Some negative checks
2333
2334/^[\P{Xwd}]+/utf
2335    !.+\x{019}\x{35a}AB
2336 0: !.+\x{19}\x{35a}
2337
2338/^[\p{^Xwd}]+/utf
2339    !.+\x{019}\x{35a}AB
2340 0: !.+\x{19}\x{35a}
2341
2342/[\D]/B,utf,ucp
2343------------------------------------------------------------------
2344        Bra
2345        [\P{Nd}]
2346        Ket
2347        End
2348------------------------------------------------------------------
2349    1\x{3c8}2
2350 0: \x{3c8}
2351
2352/[\d]/B,utf,ucp
2353------------------------------------------------------------------
2354        Bra
2355        [\p{Nd}]
2356        Ket
2357        End
2358------------------------------------------------------------------
2359    >\x{6f4}<
2360 0: \x{6f4}
2361
2362/[\S]/B,utf,ucp
2363------------------------------------------------------------------
2364        Bra
2365        [\P{Xsp}]
2366        Ket
2367        End
2368------------------------------------------------------------------
2369    \x{1680}\x{6f4}\x{1680}
2370 0: \x{6f4}
2371
2372/[\s]/B,utf,ucp
2373------------------------------------------------------------------
2374        Bra
2375        [\p{Xsp}]
2376        Ket
2377        End
2378------------------------------------------------------------------
2379    >\x{1680}<
2380 0: \x{1680}
2381
2382/[\W]/B,utf,ucp
2383------------------------------------------------------------------
2384        Bra
2385        [\P{Xwd}]
2386        Ket
2387        End
2388------------------------------------------------------------------
2389    A\x{1712}B
2390 0: \x{1712}
2391
2392/[\w]/B,utf,ucp
2393------------------------------------------------------------------
2394        Bra
2395        [\p{Xwd}]
2396        Ket
2397        End
2398------------------------------------------------------------------
2399    >\x{1723}<
2400 0: \x{1723}
2401
2402/\D/B,utf,ucp
2403------------------------------------------------------------------
2404        Bra
2405        notprop Nd
2406        Ket
2407        End
2408------------------------------------------------------------------
2409    1\x{3c8}2
2410 0: \x{3c8}
2411
2412/\d/B,utf,ucp
2413------------------------------------------------------------------
2414        Bra
2415        prop Nd
2416        Ket
2417        End
2418------------------------------------------------------------------
2419    >\x{6f4}<
2420 0: \x{6f4}
2421
2422/\S/B,utf,ucp
2423------------------------------------------------------------------
2424        Bra
2425        notprop Xsp
2426        Ket
2427        End
2428------------------------------------------------------------------
2429    \x{1680}\x{6f4}\x{1680}
2430 0: \x{6f4}
2431
2432/\s/B,utf,ucp
2433------------------------------------------------------------------
2434        Bra
2435        prop Xsp
2436        Ket
2437        End
2438------------------------------------------------------------------
2439    >\x{1680}>
2440 0: \x{1680}
2441
2442/\W/B,utf,ucp
2443------------------------------------------------------------------
2444        Bra
2445        notprop Xwd
2446        Ket
2447        End
2448------------------------------------------------------------------
2449    A\x{1712}B
2450 0: \x{1712}
2451
2452/\w/B,utf,ucp
2453------------------------------------------------------------------
2454        Bra
2455        prop Xwd
2456        Ket
2457        End
2458------------------------------------------------------------------
2459    >\x{1723}<
2460 0: \x{1723}
2461
2462/[[:alpha:]]/B,ucp
2463------------------------------------------------------------------
2464        Bra
2465        [\p{L}]
2466        Ket
2467        End
2468------------------------------------------------------------------
2469
2470/[[:lower:]]/B,ucp
2471------------------------------------------------------------------
2472        Bra
2473        [\p{Ll}]
2474        Ket
2475        End
2476------------------------------------------------------------------
2477
2478/[[:upper:]]/B,ucp
2479------------------------------------------------------------------
2480        Bra
2481        [\p{Lu}]
2482        Ket
2483        End
2484------------------------------------------------------------------
2485
2486/[[:alnum:]]/B,ucp
2487------------------------------------------------------------------
2488        Bra
2489        [\p{Xan}]
2490        Ket
2491        End
2492------------------------------------------------------------------
2493
2494/[[:ascii:]]/B,ucp
2495------------------------------------------------------------------
2496        Bra
2497        [\x00-\x7f]
2498        Ket
2499        End
2500------------------------------------------------------------------
2501
2502/[[:cntrl:]]/B,ucp
2503------------------------------------------------------------------
2504        Bra
2505        [\p{Cc}]
2506        Ket
2507        End
2508------------------------------------------------------------------
2509
2510/[[:digit:]]/B,ucp
2511------------------------------------------------------------------
2512        Bra
2513        [\p{Nd}]
2514        Ket
2515        End
2516------------------------------------------------------------------
2517
2518/[[:graph:]]/B,ucp
2519------------------------------------------------------------------
2520        Bra
2521        [[:graph:]]
2522        Ket
2523        End
2524------------------------------------------------------------------
2525
2526/[[:print:]]/B,ucp
2527------------------------------------------------------------------
2528        Bra
2529        [[:print:]]
2530        Ket
2531        End
2532------------------------------------------------------------------
2533
2534/[[:punct:]]/B,ucp
2535------------------------------------------------------------------
2536        Bra
2537        [[:punct:]]
2538        Ket
2539        End
2540------------------------------------------------------------------
2541
2542/[[:space:]]/B,ucp
2543------------------------------------------------------------------
2544        Bra
2545        [\p{Xps}]
2546        Ket
2547        End
2548------------------------------------------------------------------
2549
2550/[[:word:]]/B,ucp
2551------------------------------------------------------------------
2552        Bra
2553        [\p{Xwd}]
2554        Ket
2555        End
2556------------------------------------------------------------------
2557
2558/[[:xdigit:]]/B,ucp
2559------------------------------------------------------------------
2560        Bra
2561        [0-9A-Fa-f]
2562        Ket
2563        End
2564------------------------------------------------------------------
2565
2566# Unicode properties for \b abd \B
2567
2568/\b...\B/utf,ucp
2569    abc_
2570 0: abc
2571    \x{37e}abc\x{376}
2572 0: abc
2573    \x{37e}\x{376}\x{371}\x{393}\x{394}
2574 0: \x{376}\x{371}\x{393}
2575    !\x{c0}++\x{c1}\x{c2}
2576 0: ++\x{c1}
2577    !\x{c0}+++++
2578 0: \x{c0}++
2579
2580# Without PCRE_UCP, non-ASCII always fail, even if < 256
2581
2582/\b...\B/utf
2583    abc_
2584 0: abc
2585\= Expect no match
2586    \x{37e}abc\x{376}
2587No match
2588    \x{37e}\x{376}\x{371}\x{393}\x{394}
2589No match
2590    !\x{c0}++\x{c1}\x{c2}
2591No match
2592    !\x{c0}+++++
2593No match
2594
2595# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
2596
2597/\b...\B/ucp
2598    abc_
2599 0: abc
2600    !\x{c0}++\x{c1}\x{c2}
2601 0: ++\xc1
2602    !\x{c0}+++++
2603 0: \xc0++
2604
2605# Some of these are silly, but they check various combinations
2606
2607/[[:^alpha:][:^cntrl:]]+/B,utf,ucp
2608------------------------------------------------------------------
2609        Bra
2610        [\P{L}\P{Cc}]++
2611        Ket
2612        End
2613------------------------------------------------------------------
2614    123
2615 0: 123
2616    abc
2617 0: abc
2618
2619/[[:^cntrl:][:^alpha:]]+/B,utf,ucp
2620------------------------------------------------------------------
2621        Bra
2622        [\P{Cc}\P{L}]++
2623        Ket
2624        End
2625------------------------------------------------------------------
2626    123
2627 0: 123
2628    abc
2629 0: abc
2630
2631/[[:alpha:]]+/B,utf,ucp
2632------------------------------------------------------------------
2633        Bra
2634        [\p{L}]++
2635        Ket
2636        End
2637------------------------------------------------------------------
2638    abc
2639 0: abc
2640
2641/[[:^alpha:]\S]+/B,utf,ucp
2642------------------------------------------------------------------
2643        Bra
2644        [\P{L}\P{Xsp}]++
2645        Ket
2646        End
2647------------------------------------------------------------------
2648    123
2649 0: 123
2650    abc
2651 0: abc
2652
2653/[^\d]+/B,utf,ucp
2654------------------------------------------------------------------
2655        Bra
2656        [^\p{Nd}]++
2657        Ket
2658        End
2659------------------------------------------------------------------
2660    abc123
2661 0: abc
2662    abc\x{123}
2663 0: abc\x{123}
2664    \x{660}abc
2665 0: abc
2666
2667/\p{Lu}+9\p{Lu}+B\p{Lu}+b/B
2668------------------------------------------------------------------
2669        Bra
2670        prop Lu ++
2671        9
2672        prop Lu +
2673        B
2674        prop Lu ++
2675        b
2676        Ket
2677        End
2678------------------------------------------------------------------
2679
2680/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/B
2681------------------------------------------------------------------
2682        Bra
2683        notprop Lu +
2684        9
2685        notprop Lu ++
2686        B
2687        notprop Lu +
2688        b
2689        Ket
2690        End
2691------------------------------------------------------------------
2692
2693/\P{Lu}+9\P{Lu}+B\P{Lu}+b/B
2694------------------------------------------------------------------
2695        Bra
2696        notprop Lu +
2697        9
2698        notprop Lu ++
2699        B
2700        notprop Lu +
2701        b
2702        Ket
2703        End
2704------------------------------------------------------------------
2705
2706/\p{Han}+X\p{Greek}+\x{370}/B,utf
2707------------------------------------------------------------------
2708        Bra
2709        prop Han ++
2710        X
2711        prop Greek +
2712        \x{370}
2713        Ket
2714        End
2715------------------------------------------------------------------
2716
2717/\p{Xan}+!\p{Xan}+A/B
2718------------------------------------------------------------------
2719        Bra
2720        prop Xan ++
2721        !
2722        prop Xan +
2723        A
2724        Ket
2725        End
2726------------------------------------------------------------------
2727
2728/\p{Xsp}+!\p{Xsp}\t/B
2729------------------------------------------------------------------
2730        Bra
2731        prop Xsp ++
2732        !
2733        prop Xsp
2734        \x09
2735        Ket
2736        End
2737------------------------------------------------------------------
2738
2739/\p{Xps}+!\p{Xps}\t/B
2740------------------------------------------------------------------
2741        Bra
2742        prop Xps ++
2743        !
2744        prop Xps
2745        \x09
2746        Ket
2747        End
2748------------------------------------------------------------------
2749
2750/\p{Xwd}+!\p{Xwd}_/B
2751------------------------------------------------------------------
2752        Bra
2753        prop Xwd ++
2754        !
2755        prop Xwd
2756        _
2757        Ket
2758        End
2759------------------------------------------------------------------
2760
2761/A+\p{N}A+\dB+\p{N}*B+\d*/B,ucp
2762------------------------------------------------------------------
2763        Bra
2764        A++
2765        prop N
2766        A++
2767        prop Nd
2768        B+
2769        prop N *+
2770        B++
2771        prop Nd *+
2772        Ket
2773        End
2774------------------------------------------------------------------
2775
2776# These behaved oddly in Perl, so they are kept in this test
2777
2778/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2779\= Expect no match
2780    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2781No match
2782
2783/(ȺȺȺ)?\1/i,utf
2784\= Expect no match
2785    ȺȺȺⱥⱥ
2786No match
2787
2788/(\x{23a}\x{23a}\x{23a})?\1/i,utf
2789    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2790 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2791 1: \x{23a}\x{23a}\x{23a}
2792
2793/(ȺȺȺ)?\1/i,utf
2794    ȺȺȺⱥⱥⱥ
2795 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2796 1: \x{23a}\x{23a}\x{23a}
2797
2798/(\x{23a}\x{23a}\x{23a})\1/i,utf
2799\= Expect no match
2800    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
2801No match
2802
2803/(ȺȺȺ)\1/i,utf
2804\= Expect no match
2805    ȺȺȺⱥⱥ
2806No match
2807
2808/(\x{23a}\x{23a}\x{23a})\1/i,utf
2809    \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2810 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2811 1: \x{23a}\x{23a}\x{23a}
2812
2813/(ȺȺȺ)\1/i,utf
2814    ȺȺȺⱥⱥⱥ
2815 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
2816 1: \x{23a}\x{23a}\x{23a}
2817
2818/(\x{2c65}\x{2c65})\1/i,utf
2819    \x{2c65}\x{2c65}\x{23a}\x{23a}
2820 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2821 1: \x{2c65}\x{2c65}
2822
2823/(ⱥⱥ)\1/i,utf
2824    ⱥⱥȺȺ
2825 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
2826 1: \x{2c65}\x{2c65}
2827
2828/(\x{23a}\x{23a}\x{23a})\1Y/i,utf
2829    X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
2830 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
2831 1: \x{23a}\x{23a}\x{23a}
2832
2833/(\x{2c65}\x{2c65})\1Y/i,utf
2834    X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
2835 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
2836 1: \x{2c65}\x{2c65}
2837
2838# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
2839
2840/^[\p{Batak}]/utf
2841    \x{1bc0}
2842 0: \x{1bc0}
2843    \x{1bff}
2844 0: \x{1bff}
2845\= Expect no match
2846    \x{1bf4}
2847No match
2848
2849/^[\p{Brahmi}]/utf
2850    \x{11000}
2851 0: \x{11000}
2852    \x{1106f}
2853 0: \x{1106f}
2854\= Expect no match
2855    \x{1104e}
2856No match
2857
2858/^[\p{Mandaic}]/utf
2859    \x{840}
2860 0: \x{840}
2861    \x{85e}
2862 0: \x{85e}
2863\= Expect no match
2864    \x{85c}
2865No match
2866    \x{85d}
2867No match
2868
2869/(\X*)(.)/s,utf
2870    A\x{300}
2871 0: A
2872 1:
2873 2: A
2874
2875/^S(\X*)e(\X*)$/utf
2876    Stéréo
2877 0: Ste\x{301}re\x{301}o
2878 1: te\x{301}r
2879 2: \x{301}o
2880
2881/^\X/utf
2882    ́réo
2883 0: \x{301}
2884
2885/^a\X41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
2886    aX41z
2887 0: aX41z
2888\= Expect no match
2889    aAz
2890No match
2891
2892/\X/
2893    a\=ps
2894 0: a
2895    a\=ph
2896Partial match: a
2897
2898/\Xa/
2899    aa\=ps
2900 0: aa
2901    aa\=ph
2902 0: aa
2903
2904/\X{2}/
2905    aa\=ps
2906 0: aa
2907    aa\=ph
2908Partial match: aa
2909
2910/\X+a/
2911    a\=ps
2912Partial match: a
2913    aa\=ps
2914 0: aa
2915    aa\=ph
2916Partial match: aa
2917
2918/\X+?a/
2919    a\=ps
2920Partial match: a
2921    ab\=ps
2922Partial match: ab
2923    aa\=ps
2924 0: aa
2925    aa\=ph
2926 0: aa
2927    aba\=ps
2928 0: aba
2929
2930# These Unicode 6.1.0 scripts are not known to Perl.
2931
2932/\p{Chakma}\d/utf,ucp
2933    \x{11100}\x{1113c}
2934 0: \x{11100}\x{1113c}
2935
2936/\p{Takri}\d/utf,ucp
2937    \x{11680}\x{116c0}
2938 0: \x{11680}\x{116c0}
2939
2940/^\X/utf
2941    A\=ps
2942 0: A
2943    A\=ph
2944Partial match: A
2945    A\x{300}\x{301}\=ps
2946 0: A\x{300}\x{301}
2947    A\x{300}\x{301}\=ph
2948Partial match: A\x{300}\x{301}
2949    A\x{301}\=ps
2950 0: A\x{301}
2951    A\x{301}\=ph
2952Partial match: A\x{301}
2953
2954/^\X{2,3}/utf
2955    A\=ps
2956Partial match: A
2957    A\=ph
2958Partial match: A
2959    AA\=ps
2960 0: AA
2961    AA\=ph
2962Partial match: AA
2963    A\x{300}\x{301}\=ps
2964Partial match: A\x{300}\x{301}
2965    A\x{300}\x{301}\=ph
2966Partial match: A\x{300}\x{301}
2967    A\x{300}\x{301}A\x{300}\x{301}\=ps
2968 0: A\x{300}\x{301}A\x{300}\x{301}
2969    A\x{300}\x{301}A\x{300}\x{301}\=ph
2970Partial match: A\x{300}\x{301}A\x{300}\x{301}
2971
2972/^\X{2}/utf
2973    AA\=ps
2974 0: AA
2975    AA\=ph
2976Partial match: AA
2977    A\x{300}\x{301}A\x{300}\x{301}\=ps
2978 0: A\x{300}\x{301}A\x{300}\x{301}
2979    A\x{300}\x{301}A\x{300}\x{301}\=ph
2980Partial match: A\x{300}\x{301}A\x{300}\x{301}
2981
2982/^\X+/utf
2983    AA\=ps
2984 0: AA
2985    AA\=ph
2986Partial match: AA
2987
2988/^\X+?Z/utf
2989    AA\=ps
2990Partial match: AA
2991    AA\=ph
2992Partial match: AA
2993
2994/A\x{3a3}B/IBi,utf
2995------------------------------------------------------------------
2996        Bra
2997     /i A
2998        clist 03a3 03c2 03c3
2999     /i B
3000        Ket
3001        End
3002------------------------------------------------------------------
3003Capturing subpattern count = 0
3004Options: caseless utf
3005First code unit = 'A' (caseless)
3006Last code unit = 'B' (caseless)
3007Subject length lower bound = 3
3008
3009/[\x{3a3}]/Bi,utf
3010------------------------------------------------------------------
3011        Bra
3012        clist 03a3 03c2 03c3
3013        Ket
3014        End
3015------------------------------------------------------------------
3016
3017/[^\x{3a3}]/Bi,utf
3018------------------------------------------------------------------
3019        Bra
3020        not clist 03a3 03c2 03c3
3021        Ket
3022        End
3023------------------------------------------------------------------
3024
3025/[\x{3a3}]+/Bi,utf
3026------------------------------------------------------------------
3027        Bra
3028        clist 03a3 03c2 03c3 ++
3029        Ket
3030        End
3031------------------------------------------------------------------
3032
3033/[^\x{3a3}]+/Bi,utf
3034------------------------------------------------------------------
3035        Bra
3036        not clist 03a3 03c2 03c3 ++
3037        Ket
3038        End
3039------------------------------------------------------------------
3040
3041/a*\x{3a3}/Bi,utf
3042------------------------------------------------------------------
3043        Bra
3044     /i a*+
3045        clist 03a3 03c2 03c3
3046        Ket
3047        End
3048------------------------------------------------------------------
3049
3050/\x{3a3}+a/Bi,utf
3051------------------------------------------------------------------
3052        Bra
3053        clist 03a3 03c2 03c3 ++
3054     /i a
3055        Ket
3056        End
3057------------------------------------------------------------------
3058
3059/\x{3a3}*\x{3c2}/Bi,utf
3060------------------------------------------------------------------
3061        Bra
3062        clist 03a3 03c2 03c3 *
3063        clist 03a3 03c2 03c3
3064        Ket
3065        End
3066------------------------------------------------------------------
3067
3068/\x{3a3}{3}/i,utf,aftertext
3069    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3070 0: \x{3a3}\x{3c3}\x{3c2}
3071 0+ \x{3a3}\x{3c3}\x{3c2}
3072
3073/\x{3a3}{2,4}/i,utf,aftertext
3074    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3075 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}
3076 0+ \x{3c3}\x{3c2}
3077
3078/\x{3a3}{2,4}?/i,utf,aftertext
3079    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3080 0: \x{3a3}\x{3c3}
3081 0+ \x{3c2}\x{3a3}\x{3c3}\x{3c2}
3082
3083/\x{3a3}+./i,utf,aftertext
3084    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3085 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3086 0+
3087
3088/\x{3a3}++./i,utf,aftertext
3089\= Expect no match
3090    \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
3091No match
3092
3093/\x{3a3}*\x{3c2}/Bi,utf
3094------------------------------------------------------------------
3095        Bra
3096        clist 03a3 03c2 03c3 *
3097        clist 03a3 03c2 03c3
3098        Ket
3099        End
3100------------------------------------------------------------------
3101
3102/[^\x{3a3}]*\x{3c2}/Bi,utf
3103------------------------------------------------------------------
3104        Bra
3105        not clist 03a3 03c2 03c3 *+
3106        clist 03a3 03c2 03c3
3107        Ket
3108        End
3109------------------------------------------------------------------
3110
3111/[^a]*\x{3c2}/Bi,utf
3112------------------------------------------------------------------
3113        Bra
3114     /i [^a]*
3115        clist 03a3 03c2 03c3
3116        Ket
3117        End
3118------------------------------------------------------------------
3119
3120/ist/Bi,utf
3121------------------------------------------------------------------
3122        Bra
3123     /i i
3124        clist 0053 0073 017f
3125     /i t
3126        Ket
3127        End
3128------------------------------------------------------------------
3129\= Expect no match
3130    ikt
3131No match
3132
3133/is+t/i,utf
3134    iSs\x{17f}t
3135 0: iSs\x{17f}t
3136\= Expect no match
3137    ikt
3138No match
3139
3140/is+?t/i,utf
3141\= Expect no match
3142    ikt
3143No match
3144
3145/is?t/i,utf
3146\= Expect no match
3147    ikt
3148No match
3149
3150/is{2}t/i,utf
3151\= Expect no match
3152    iskt
3153No match
3154
3155# This property is a PCRE special
3156
3157/^\p{Xuc}/utf
3158    $abc
3159 0: $
3160    @abc
3161 0: @
3162    `abc
3163 0: `
3164    \x{1234}abc
3165 0: \x{1234}
3166\= Expect no match
3167    abc
3168No match
3169
3170/^\p{Xuc}+/utf
3171    $@`\x{a0}\x{1234}\x{e000}**
3172 0: $@`\x{a0}\x{1234}\x{e000}
3173\= Expect no match
3174    \x{9f}
3175No match
3176
3177/^\p{Xuc}+?/utf
3178    $@`\x{a0}\x{1234}\x{e000}**
3179 0: $
3180\= Expect no match
3181    \x{9f}
3182No match
3183
3184/^\p{Xuc}+?\*/utf
3185    $@`\x{a0}\x{1234}\x{e000}**
3186 0: $@`\x{a0}\x{1234}\x{e000}*
3187\= Expect no match
3188    \x{9f}
3189No match
3190
3191/^\p{Xuc}++/utf
3192    $@`\x{a0}\x{1234}\x{e000}**
3193 0: $@`\x{a0}\x{1234}\x{e000}
3194\= Expect no match
3195    \x{9f}
3196No match
3197
3198/^\p{Xuc}{3,5}/utf
3199    $@`\x{a0}\x{1234}\x{e000}**
3200 0: $@`\x{a0}\x{1234}
3201\= Expect no match
3202    \x{9f}
3203No match
3204
3205/^\p{Xuc}{3,5}?/utf
3206    $@`\x{a0}\x{1234}\x{e000}**
3207 0: $@`
3208\= Expect no match
3209    \x{9f}
3210No match
3211
3212/^[\p{Xuc}]/utf
3213    $@`\x{a0}\x{1234}\x{e000}**
3214 0: $
3215\= Expect no match
3216    \x{9f}
3217No match
3218
3219/^[\p{Xuc}]+/utf
3220    $@`\x{a0}\x{1234}\x{e000}**
3221 0: $@`\x{a0}\x{1234}\x{e000}
3222\= Expect no match
3223    \x{9f}
3224No match
3225
3226/^\P{Xuc}/utf
3227    abc
3228 0: a
3229\= Expect no match
3230    $abc
3231No match
3232    @abc
3233No match
3234    `abc
3235No match
3236    \x{1234}abc
3237No match
3238
3239/^[\P{Xuc}]/utf
3240    abc
3241 0: a
3242\= Expect no match
3243    $abc
3244No match
3245    @abc
3246No match
3247    `abc
3248No match
3249    \x{1234}abc
3250No match
3251
3252# Some auto-possessification tests
3253
3254/\pN+\z/B
3255------------------------------------------------------------------
3256        Bra
3257        prop N ++
3258        \z
3259        Ket
3260        End
3261------------------------------------------------------------------
3262
3263/\PN+\z/B
3264------------------------------------------------------------------
3265        Bra
3266        notprop N ++
3267        \z
3268        Ket
3269        End
3270------------------------------------------------------------------
3271
3272/\pN+/B
3273------------------------------------------------------------------
3274        Bra
3275        prop N ++
3276        Ket
3277        End
3278------------------------------------------------------------------
3279
3280/\PN+/B
3281------------------------------------------------------------------
3282        Bra
3283        notprop N ++
3284        Ket
3285        End
3286------------------------------------------------------------------
3287
3288/\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
3289------------------------------------------------------------------
3290        Bra
3291        prop Any +
3292        prop Any
3293        prop Any +
3294        notprop Any
3295        prop Any +
3296        prop L&
3297        prop Any +
3298        prop L
3299        prop Any +
3300        prop Lu
3301        prop Any +
3302        prop Han
3303        prop Any +
3304        prop Xan
3305        prop Any +
3306        prop Xsp
3307        prop Any +
3308        prop Xps
3309        prop Xwd +
3310        prop Any
3311        prop Any +
3312        prop Xuc
3313        Ket
3314        End
3315------------------------------------------------------------------
3316
3317/\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
3318------------------------------------------------------------------
3319        Bra
3320        prop L& +
3321        prop Any
3322        prop L& +
3323        prop L&
3324        notprop L& ++
3325        prop L&
3326        prop L& +
3327        prop L
3328        prop L& +
3329        prop Lu
3330        prop L& +
3331        prop Han
3332        prop L& +
3333        prop Xan
3334        prop L& ++
3335        notprop Xan
3336        prop L& ++
3337        prop Xsp
3338        prop L& ++
3339        prop Xps
3340        prop Xwd +
3341        prop L&
3342        prop L& +
3343        prop Xuc
3344        Ket
3345        End
3346------------------------------------------------------------------
3347
3348/\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
3349------------------------------------------------------------------
3350        Bra
3351        prop N +
3352        prop Any
3353        prop N +
3354        prop L&
3355        prop N ++
3356        prop L
3357        prop N +
3358        notprop L
3359        prop N ++
3360        notprop N
3361        prop N ++
3362        prop Lu
3363        prop N +
3364        prop Han
3365        prop N +
3366        prop Xan
3367        prop N ++
3368        prop Xsp
3369        prop N ++
3370        prop Xps
3371        prop Xwd +
3372        prop N
3373        prop N +
3374        prop Xuc
3375        Ket
3376        End
3377------------------------------------------------------------------
3378
3379/\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
3380------------------------------------------------------------------
3381        Bra
3382        prop Lu +
3383        prop Any
3384        prop Lu +
3385        prop L&
3386        prop Lu +
3387        prop L
3388        prop Lu +
3389        prop Lu
3390        notprop Lu ++
3391        prop Lu
3392        prop Lu ++
3393        prop Nd
3394        prop Lu +
3395        notprop Nd
3396        prop Lu +
3397        prop Han
3398        prop Lu +
3399        prop Xan
3400        prop Lu ++
3401        prop Xsp
3402        prop Lu ++
3403        prop Xps
3404        prop Xwd +
3405        prop Lu
3406        prop Lu +
3407        prop Xuc
3408        Ket
3409        End
3410------------------------------------------------------------------
3411
3412/\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
3413------------------------------------------------------------------
3414        Bra
3415        prop Han +
3416        prop Lu
3417        prop Han +
3418        prop L&
3419        prop Han +
3420        prop L
3421        prop Han +
3422        prop Lu
3423        prop Han ++
3424        prop Arabic
3425        prop Arabic +
3426        prop Arabic
3427        prop Han +
3428        prop Xan
3429        prop Han +
3430        prop Xsp
3431        prop Han +
3432        prop Xps
3433        prop Xwd +
3434        prop Han
3435        prop Han +
3436        prop Xuc
3437        Ket
3438        End
3439------------------------------------------------------------------
3440
3441/\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
3442------------------------------------------------------------------
3443        Bra
3444        prop Xan +
3445        prop Any
3446        prop Xan +
3447        prop L&
3448        notprop Xan ++
3449        prop L&
3450        prop Xan +
3451        prop L
3452        prop Xan +
3453        prop Lu
3454        prop Xan +
3455        prop Han
3456        prop Xan +
3457        prop Xan
3458        prop Xan ++
3459        notprop Xan
3460        prop Xan ++
3461        prop Xsp
3462        prop Xan ++
3463        prop Xps
3464        prop Xwd +
3465        prop Xan
3466        prop Xan +
3467        prop Xuc
3468        Ket
3469        End
3470------------------------------------------------------------------
3471
3472/\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
3473------------------------------------------------------------------
3474        Bra
3475        prop Xsp +
3476        prop Any
3477        prop Xsp ++
3478        prop L&
3479        prop Xsp ++
3480        prop L
3481        prop Xsp ++
3482        prop Lu
3483        prop Xsp +
3484        prop Han
3485        prop Xsp ++
3486        prop Xan
3487        prop Xsp +
3488        prop Xsp
3489        notprop Xsp ++
3490        prop Xsp
3491        prop Xsp +
3492        prop Xps
3493        prop Xwd ++
3494        prop Xsp
3495        prop Xsp +
3496        prop Xuc
3497        Ket
3498        End
3499------------------------------------------------------------------
3500
3501/\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
3502------------------------------------------------------------------
3503        Bra
3504        prop Xwd +
3505        prop Any
3506        prop Xwd +
3507        prop L&
3508        prop Xwd +
3509        prop L
3510        prop Xwd +
3511        prop Lu
3512        prop Xwd +
3513        prop Han
3514        prop Xwd +
3515        prop Xan
3516        prop Xwd ++
3517        prop Xsp
3518        prop Xwd ++
3519        prop Xps
3520        prop Xwd +
3521        prop Xwd
3522        prop Xwd ++
3523        notprop Xwd
3524        prop Xwd +
3525        prop Xuc
3526        Ket
3527        End
3528------------------------------------------------------------------
3529
3530/\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
3531------------------------------------------------------------------
3532        Bra
3533        prop Xuc +
3534        prop Any
3535        prop Xuc +
3536        prop L&
3537        prop Xuc +
3538        prop L
3539        prop Xuc +
3540        prop Lu
3541        prop Xuc +
3542        prop Han
3543        prop Xuc +
3544        prop Xan
3545        prop Xuc +
3546        prop Xsp
3547        prop Xuc +
3548        prop Xps
3549        prop Xwd +
3550        prop Xuc
3551        prop Xuc +
3552        prop Xuc
3553        prop Xuc ++
3554        notprop Xuc
3555        Ket
3556        End
3557------------------------------------------------------------------
3558
3559/\p{N}+\p{Ll} \p{N}+\p{Nd} \p{N}+\P{Nd}/Bx,ucp
3560------------------------------------------------------------------
3561        Bra
3562        prop N ++
3563        prop Ll
3564        prop N +
3565        prop Nd
3566        prop N +
3567        notprop Nd
3568        Ket
3569        End
3570------------------------------------------------------------------
3571
3572/\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
3573------------------------------------------------------------------
3574        Bra
3575        prop Xan +
3576        prop L
3577        prop Xan +
3578        prop N
3579        prop Xan ++
3580        prop C
3581        prop Xan +
3582        notprop L
3583        notprop Xan ++
3584        prop N
3585        prop Xan +
3586        notprop C
3587        Ket
3588        End
3589------------------------------------------------------------------
3590
3591/\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
3592------------------------------------------------------------------
3593        Bra
3594        prop L +
3595        prop Xan
3596        prop N +
3597        prop Xan
3598        prop C ++
3599        prop Xan
3600        notprop L +
3601        prop Xan
3602        prop N +
3603        prop Xan
3604        notprop C +
3605        prop Xan
3606        prop L ++
3607        notprop Xan
3608        Ket
3609        End
3610------------------------------------------------------------------
3611
3612/\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
3613------------------------------------------------------------------
3614        Bra
3615        prop Xan +
3616        prop Lu
3617        prop Xan +
3618        prop Nd
3619        prop Xan ++
3620        prop Cc
3621        prop Xan +
3622        notprop Ll
3623        notprop Xan ++
3624        prop No
3625        prop Xan +
3626        notprop Cf
3627        Ket
3628        End
3629------------------------------------------------------------------
3630
3631/\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
3632------------------------------------------------------------------
3633        Bra
3634        prop Lu +
3635        prop Xan
3636        prop Nd +
3637        prop Xan
3638        prop Cs ++
3639        prop Xan
3640        notprop Lt +
3641        prop Xan
3642        prop Nl +
3643        prop Xan
3644        notprop Cc +
3645        prop Xan
3646        prop Lt ++
3647        notprop Xan
3648        Ket
3649        End
3650------------------------------------------------------------------
3651
3652/\w+\p{P} \w+\p{Po} \w+\s \p{Xan}+\s \s+\p{Xan} \s+\w/Bx,ucp
3653------------------------------------------------------------------
3654        Bra
3655        prop Xwd +
3656        prop P
3657        prop Xwd +
3658        prop Po
3659        prop Xwd ++
3660        prop Xsp
3661        prop Xan ++
3662        prop Xsp
3663        prop Xsp ++
3664        prop Xan
3665        prop Xsp ++
3666        prop Xwd
3667        Ket
3668        End
3669------------------------------------------------------------------
3670
3671/\w+\P{P} \W+\p{Po} \w+\S \P{Xan}+\s \s+\P{Xan} \s+\W/Bx,ucp
3672------------------------------------------------------------------
3673        Bra
3674        prop Xwd +
3675        notprop P
3676        notprop Xwd +
3677        prop Po
3678        prop Xwd +
3679        notprop Xsp
3680        notprop Xan +
3681        prop Xsp
3682        prop Xsp +
3683        notprop Xan
3684        prop Xsp +
3685        notprop Xwd
3686        Ket
3687        End
3688------------------------------------------------------------------
3689
3690/\w+\p{Po} \w+\p{Pc} \W+\p{Po} \W+\p{Pc} \w+\P{Po} \w+\P{Pc}/Bx,ucp
3691------------------------------------------------------------------
3692        Bra
3693        prop Xwd +
3694        prop Po
3695        prop Xwd ++
3696        prop Pc
3697        notprop Xwd +
3698        prop Po
3699        notprop Xwd +
3700        prop Pc
3701        prop Xwd +
3702        notprop Po
3703        prop Xwd +
3704        notprop Pc
3705        Ket
3706        End
3707------------------------------------------------------------------
3708
3709/\p{Nl}+\p{Xan} \P{Nl}+\p{Xan} \p{Nl}+\P{Xan} \P{Nl}+\P{Xan}/Bx,ucp
3710------------------------------------------------------------------
3711        Bra
3712        prop Nl +
3713        prop Xan
3714        notprop Nl +
3715        prop Xan
3716        prop Nl ++
3717        notprop Xan
3718        notprop Nl +
3719        notprop Xan
3720        Ket
3721        End
3722------------------------------------------------------------------
3723
3724/\p{Xan}+\p{Nl} \P{Xan}+\p{Nl} \p{Xan}+\P{Nl} \P{Xan}+\P{Nl}/Bx,ucp
3725------------------------------------------------------------------
3726        Bra
3727        prop Xan +
3728        prop Nl
3729        notprop Xan ++
3730        prop Nl
3731        prop Xan +
3732        notprop Nl
3733        notprop Xan +
3734        notprop Nl
3735        Ket
3736        End
3737------------------------------------------------------------------
3738
3739/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/Bx,ucp
3740------------------------------------------------------------------
3741        Bra
3742        prop Xan +
3743        prop Nd
3744        notprop Xan ++
3745        prop Nd
3746        prop Xan +
3747        notprop Nd
3748        notprop Xan +
3749        notprop Nd
3750        Ket
3751        End
3752------------------------------------------------------------------
3753
3754# End auto-possessification tests
3755
3756/\w+/B,utf,ucp,auto_callout
3757------------------------------------------------------------------
3758        Bra
3759        Callout 255 0 3
3760        prop Xwd ++
3761        Callout 255 3 0
3762        Ket
3763        End
3764------------------------------------------------------------------
3765    abcd
3766--->abcd
3767 +0 ^        \w+
3768 +3 ^   ^    End of pattern
3769 0: abcd
3770
3771/[\p{N}]?+/B,no_auto_possess
3772------------------------------------------------------------------
3773        Bra
3774        [\p{N}]?+
3775        Ket
3776        End
3777------------------------------------------------------------------
3778
3779/[\p{L}ab]{2,3}+/B,no_auto_possess
3780------------------------------------------------------------------
3781        Bra
3782        [ab\p{L}]{2,3}+
3783        Ket
3784        End
3785------------------------------------------------------------------
3786
3787/\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
3788------------------------------------------------------------------
3789        Bra
3790        \D+
3791        extuni
3792        \d+
3793        extuni
3794        \S+
3795        extuni
3796        \s+
3797        extuni
3798        \W+
3799        extuni
3800        \w+
3801        extuni
3802        \R+
3803        extuni
3804        \H+
3805        extuni
3806        \h+
3807        extuni
3808        \V+
3809        extuni
3810        \v+
3811        extuni
3812        a+
3813        extuni
3814        \x0a+
3815        extuni
3816        Any+
3817        extuni
3818        Ket
3819        End
3820------------------------------------------------------------------
3821
3822/.+\X/Bsx
3823------------------------------------------------------------------
3824        Bra
3825        AllAny+
3826        extuni
3827        Ket
3828        End
3829------------------------------------------------------------------
3830
3831/\X+$/Bmx
3832------------------------------------------------------------------
3833        Bra
3834        extuni+
3835     /m $
3836        Ket
3837        End
3838------------------------------------------------------------------
3839
3840/\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
3841------------------------------------------------------------------
3842        Bra
3843        extuni+
3844        \D
3845        extuni+
3846        \d
3847        extuni+
3848        \S
3849        extuni+
3850        \s
3851        extuni+
3852        \W
3853        extuni+
3854        \w
3855        extuni+
3856        Any
3857        extuni+
3858        \R
3859        extuni+
3860        \H
3861        extuni+
3862        \h
3863        extuni+
3864        \V
3865        extuni+
3866        \v
3867        extuni+
3868        extuni
3869        extuni+
3870        \Z
3871        extuni++
3872        \z
3873        extuni+
3874        $
3875        Ket
3876        End
3877------------------------------------------------------------------
3878
3879/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B,utf,ucp
3880------------------------------------------------------------------
3881        Bra
3882        prop Nd ++
3883        prop Xsp {0,5}+
3884        =
3885        prop Xsp *+
3886        notprop Xsp ?
3887        =
3888        prop Xwd {0,4}+
3889        notprop Xwd *+
3890        Ket
3891        End
3892------------------------------------------------------------------
3893
3894/[RST]+/Bi,utf,ucp
3895------------------------------------------------------------------
3896        Bra
3897        [R-Tr-t\x{17f}]++
3898        Ket
3899        End
3900------------------------------------------------------------------
3901
3902/[R-T]+/Bi,utf,ucp
3903------------------------------------------------------------------
3904        Bra
3905        [R-Tr-t\x{17f}]++
3906        Ket
3907        End
3908------------------------------------------------------------------
3909
3910/[Q-U]+/Bi,utf,ucp
3911------------------------------------------------------------------
3912        Bra
3913        [Q-Uq-u\x{17f}]++
3914        Ket
3915        End
3916------------------------------------------------------------------
3917
3918/^s?c/Iim,utf
3919Capturing subpattern count = 0
3920Options: caseless multiline utf
3921First code unit at start or follows newline
3922Last code unit = 'c' (caseless)
3923Subject length lower bound = 1
3924    scat
3925 0: sc
3926
3927/\X?abc/utf,no_start_optimize
3928    \xff\x7f\x00\x00\x03\x00\x41\xcc\x80\x41\x{300}\x61\x62\x63\x00\=no_utf_check,offset=06
3929 0: A\x{300}abc
3930
3931/\x{100}\x{200}\K\x{300}/utf,startchar
3932    \x{100}\x{200}\x{300}
3933 0: \x{100}\x{200}\x{300}
3934    ^^^^^^^^^^^^^^
3935
3936# Test UTF characters in a substitution
3937
3938bc/utf,replace=XሴZ
3939    123ábc123
3940 1: 123X\x{1234}Z123
3941
3942/(?<=abc)(|def)/g,utf,replace=<$0>
3943    123abcáyzabcdef789abcሴqr
3944 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
3945
3946/[A-`]/iB,utf
3947------------------------------------------------------------------
3948        Bra
3949        [A-z\x{212a}\x{17f}]
3950        Ket
3951        End
3952------------------------------------------------------------------
3953    abcdefghijklmno
3954 0: a
3955
3956/(?<=\K\x{17f})/g,utf,aftertext
3957    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
3958 0: \x{17f}
3959 0+ \x{17f}\x{17f}\x{17f}\x{17f}
3960 0: \x{17f}
3961 0+ \x{17f}\x{17f}\x{17f}
3962 0: \x{17f}
3963 0+ \x{17f}\x{17f}
3964 0: \x{17f}
3965 0+ \x{17f}
3966 0: \x{17f}
3967 0+
3968
3969/(?<=\K\x{17f})/altglobal,utf,aftertext
3970    \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
3971 0: \x{17f}
3972 0+ \x{17f}\x{17f}\x{17f}\x{17f}
3973 0: \x{17f}
3974 0+ \x{17f}\x{17f}\x{17f}
3975 0: \x{17f}
3976 0+ \x{17f}\x{17f}
3977 0: \x{17f}
3978 0+ \x{17f}
3979 0: \x{17f}
3980 0+
3981
3982"\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"
3983Failed: error 122 at offset 1227: unmatched closing parenthesis
3984
3985/$(&.+[\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'})*?/
3986
3987"(*UTF)(*UCP)(.UTF).+X(\V+;\^(\D|)!999}(?(?C{7(?C')\H*\S*/^\x5\xa\\xd3\x85n?(;\D*(?m).[^mH+((*UCP)(*U:F)})(?!^)(?'"
3988Failed: error 162 at offset 113: subpattern name expected
3989
3990/[\pS#moq]/
3991    =
3992 0: =
3993
3994/(*:a\x{12345}b\t(d\)c)xxx/utf,alt_verbnames,mark
3995    cxxxz
3996 0: xxx
3997MK: a\x{12345}b\x{09}(d)c
3998
3999/abcd/utf,replace=x\x{824}y\o{3333}z(\Q12\$34$$\x34\E5$$),substitute_extended
4000    abcd
4001 1: x\x{824}y\x{6db}z(12\$34$$\x345$)
4002
4003/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
4004    a\x{e0}\x{101}\x{c0}\x{102}
4005 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
4006
4007/((?<digit>\d)|(?<letter>\p{L}))/g,substitute_extended,replace=<${digit:+digit; :not digit; }${letter:+letter:not a letter}>
4008    ab12cde
4009 7: <not digit; letter><not digit; letter><digit; not a letter><digit; not a letter><not digit; letter><not digit; letter><not digit; letter>
4010
4011/(*UCP)(*UTF)[[:>:]]X/B
4012------------------------------------------------------------------
4013        Bra
4014        \b
4015        AssertB
4016        Reverse
4017        prop Xwd
4018        Ket
4019        X
4020        Ket
4021        End
4022------------------------------------------------------------------
4023
4024/abc/utf,replace=xyz
4025    abc\=zero_terminate
4026 1: xyz
4027
4028/a[[:punct:]b]/ucp,bincode
4029------------------------------------------------------------------
4030        Bra
4031        a
4032        [b[:punct:]]
4033        Ket
4034        End
4035------------------------------------------------------------------
4036
4037/a[[:punct:]b]/utf,ucp,bincode
4038------------------------------------------------------------------
4039        Bra
4040        a
4041        [b[:punct:]]
4042        Ket
4043        End
4044------------------------------------------------------------------
4045
4046/a[b[:punct:]]/utf,ucp,bincode
4047------------------------------------------------------------------
4048        Bra
4049        a
4050        [b[:punct:]]
4051        Ket
4052        End
4053------------------------------------------------------------------
4054
4055/[[:^ascii:]]/utf,ucp,bincode
4056------------------------------------------------------------------
4057        Bra
4058        [\x80-\xff] (neg)
4059        Ket
4060        End
4061------------------------------------------------------------------
4062
4063/[[:^ascii:]\w]/utf,ucp,bincode
4064------------------------------------------------------------------
4065        Bra
4066        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4067        Ket
4068        End
4069------------------------------------------------------------------
4070
4071/[\w[:^ascii:]]/utf,ucp,bincode
4072------------------------------------------------------------------
4073        Bra
4074        [\x80-\xff\p{Xwd}\x{100}-\x{10ffff}]
4075        Ket
4076        End
4077------------------------------------------------------------------
4078
4079/[^[:ascii:]\W]/utf,ucp,bincode
4080------------------------------------------------------------------
4081        Bra
4082        [^\x00-\x7f\P{Xwd}]
4083        Ket
4084        End
4085------------------------------------------------------------------
4086    \x{de}
4087 0: \x{de}
4088    \x{200}
4089 0: \x{200}
4090\= Expect no match
4091    \x{300}
4092No match
4093    \x{37e}
4094No match
4095
4096/[[:^ascii:]a]/utf,ucp,bincode
4097------------------------------------------------------------------
4098        Bra
4099        [a\x80-\xff] (neg)
4100        Ket
4101        End
4102------------------------------------------------------------------
4103
4104/L(?#(|++<!(2)?/B,utf,no_auto_possess,auto_callout
4105------------------------------------------------------------------
4106        Bra
4107        Callout 255 0 14
4108        L?
4109        Callout 255 14 0
4110        Ket
4111        End
4112------------------------------------------------------------------
4113
4114/L(?#(|++<!(2)?/B,utf,ucp,auto_callout
4115------------------------------------------------------------------
4116        Bra
4117        Callout 255 0 14
4118        L?+
4119        Callout 255 14 0
4120        Ket
4121        End
4122------------------------------------------------------------------
4123
4124/(*UTF)C\x09((?<!'(?x)!*H? #\xcc\x9a[^$]/
4125Failed: error 114 at offset 39: missing closing parenthesis
4126
4127/[\D]/utf
4128    \x{1d7cf}
4129 0: \x{1d7cf}
4130
4131/[\D\P{Nd}]/utf
4132    \x{1d7cf}
4133 0: \x{1d7cf}
4134
4135/[^\D]/utf
4136    a9b
4137 0: 9
4138\= Expect no match
4139    \x{1d7cf}
4140No match
4141
4142/[^\D\P{Nd}]/utf
4143    a9b
4144 0: 9
4145    \x{1d7cf}
4146 0: \x{1d7cf}
4147\= Expect no match
4148    \x{10000}
4149No match
4150
4151# Hex uses pattern length, not zero-terminated. This tests for overrunning
4152# the given length of a pattern.
4153
4154/'(*UTF)'/hex
4155
4156/'#('/hex,extended,utf
4157
4158/a(?<=A\XB)/utf
4159Failed: error 125 at offset 1: lookbehind assertion is not fixed length
4160
4161/ab(?<=A\RB)/utf
4162Failed: error 125 at offset 2: lookbehind assertion is not fixed length
4163
4164/../utf,auto_callout
4165    \n\x{123}\x{123}\x{123}\x{123}
4166--->\x{0a}\x{123}\x{123}\x{123}\x{123}
4167 +0 ^                                      .
4168 +0       ^                                .
4169 +1       ^      ^                         .
4170 +2       ^             ^                  End of pattern
4171 0: \x{123}\x{123}
4172
4173# This tests processing wide characters in extended mode.
4174
4175/XȀ/x,utf
4176
4177# These three test a bug fix that was not clearing up after a locale setting
4178# when the test or a subsequent one matched a wide character.
4179
4180//locale=C
4181
4182/[\P{Yi}]/utf
4183\x{2f000}
4184 0: \x{2f000}
4185
4186/[\P{Yi}]/utf,locale=C
4187\x{2f000}
4188 0: \x{2f000}
4189
4190/^(?<!(?=��))/B,utf
4191------------------------------------------------------------------
4192        Bra
4193        ^
4194        AssertB not
4195        Assert
4196        \x{10385c}
4197        Ket
4198        Ket
4199        Ket
4200        End
4201------------------------------------------------------------------
4202
4203# Horizontal and vertical space lists ignore caseless
4204
4205/[\HH]/Bi,utf
4206------------------------------------------------------------------
4207        Bra
4208        [\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}]
4209        Ket
4210        End
4211------------------------------------------------------------------
4212
4213/[^\HH]/Bi,utf
4214------------------------------------------------------------------
4215        Bra
4216        [^\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}]
4217        Ket
4218        End
4219------------------------------------------------------------------
4220
4221//g,utf
4222    \=zero_terminate
4223 0:
4224
4225/^(?1)\p{Nd}{3}(a)/
4226    a123a
4227 0: a123a
4228 1: a
4229
4230/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info
4231Callout 1  x
4232
4233# ---------------------------------------------------------------------------
4234
4235# A bunch of tests that hit lines of code that others do not (at least when
4236# these were created).
4237
4238/^[^a]{3,}?x/i,utf,no_start_optimize,no_auto_possess
4239\= Expect no match
4240    bbb
4241No match
4242    cc
4243No match
4244
4245/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess
4246\= Expect no match
4247    aaa\x{100}
4248No match
4249
4250/^X\X/no_start_optimize,no_auto_possess
4251\= Expect no match
4252    X
4253No match
4254
4255/^X\p{L&}+?/no_start_optimize,no_auto_possess
4256\= Expect no match
4257    X
4258No match
4259
4260/^X\p{L}+?/no_start_optimize,no_auto_possess
4261\= Expect no match
4262    X
4263No match
4264
4265/^X\p{Lu}+?/no_start_optimize,no_auto_possess
4266\= Expect no match
4267    X
4268No match
4269
4270/^X\p{Arabic}+?/no_start_optimize,no_auto_possess
4271\= Expect no match
4272    X
4273No match
4274
4275/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess
4276\= Expect no match
4277    X
4278No match
4279
4280/^X\s+?/ucp,no_start_optimize,no_auto_possess
4281\= Expect no match
4282    X
4283No match
4284    XX
4285No match
4286
4287/^X\S+?/ucp,no_start_optimize,no_auto_possess
4288    XX
4289 0: XX
4290\= Expect no match
4291    X
4292No match
4293
4294/^X\w+?/ucp,no_start_optimize,no_auto_possess
4295\= Expect no match
4296    X
4297No match
4298
4299/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
4300\= Expect no match
4301    X
4302No match
4303
4304/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
4305\= Expect no match
4306    X
4307No match
4308
4309/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess
4310\= Expect no match
4311    X
4312No match
4313
4314/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
4315\= Expect no match
4316    X
4317No match
4318
4319/^X\R+?/utf,no_start_optimize,no_auto_possess
4320\= Expect no match
4321    X
4322No match
4323
4324/^X\H+?/utf,no_start_optimize,no_auto_possess
4325\= Expect no match
4326    X
4327No match
4328
4329/^X\V+?/utf,no_start_optimize,no_auto_possess
4330\= Expect no match
4331    X
4332No match
4333
4334/^X\s+?/utf,no_start_optimize,no_auto_possess
4335\= Expect no match
4336    X
4337No match
4338    XX
4339No match
4340
4341/^X\S+?/utf,no_start_optimize,no_auto_possess
4342\= Expect no match
4343    X
4344No match
4345
4346/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess
4347    XYYYZ
4348 0: XYYYZ
4349\= Expect no match
4350    XY
4351No match
4352    XYY
4353No match
4354    XYYY
4355No match
4356    XYYYYZ
4357No match
4358
4359/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess
4360\= Expect no match
4361    XY
4362No match
4363    XY!
4364No match
4365
4366/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess
4367\= Expect no match
4368    XY
4369No match
4370    XY!
4371No match
4372
4373/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess
4374\= Expect no match
4375    XY
4376No match
4377    XY!
4378No match
4379
4380/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess
4381\= Expect no match
4382    XY
4383No match
4384    XY!
4385No match
4386    XY\x{2f00}!
4387No match
4388
4389/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess
4390\= Expect no match
4391    XY
4392No match
4393    XY!
4394No match
4395
4396/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
4397\= Expect no match
4398    X\n
4399No match
4400    X\n!
4401No match
4402    X\n\n!
4403No match
4404
4405/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
4406\= Expect no match
4407    XYY\n
4408No match
4409
4410/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess
4411\= Expect no match
4412    XY
4413No match
4414    XY!
4415No match
4416    XYY!
4417No match
4418
4419/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess
4420\= Expect no match
4421    X
4422No match
4423    X\x{b5}
4424No match
4425    X\x{b5}\x{b5}Y
4426No match
4427
4428/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess
4429\= Expect no match
4430    X
4431No match
4432    X$
4433No match
4434    X@@Y
4435No match
4436
4437/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess
4438\= Expect partial match
4439    XYY\r\=ph
4440Partial match: XYY\x{0d}
4441\= Expect no match
4442    X
4443No match
4444
4445/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
4446\= Expect no match
4447    X
4448No match
4449    XYY
4450No match
4451
4452/^X\R+?Z/utf,no_start_optimize,no_auto_possess
4453\= Expect no match
4454    X\nX
4455No match
4456    X\n\rX
4457No match
4458    X\n\r\nX
4459No match
4460    X\n\n
4461No match
4462    X\n\x{0c}
4463No match
4464
4465/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess
4466\= Expect no match
4467    X\nX
4468No match
4469    X\n\rX
4470No match
4471    X\n\r\nX
4472No match
4473    X\n\n
4474No match
4475    X\n\x{0c}
4476No match
4477
4478/^X\H+?Z/utf,no_start_optimize,no_auto_possess
4479\= Expect no match
4480    XY\t
4481No match
4482    XYY
4483No match
4484
4485/^X\h+?Z/utf,no_start_optimize,no_auto_possess
4486\= Expect no match
4487    X\t\t
4488No match
4489    X\tY
4490No match
4491
4492/^X\V+?Z/utf,no_start_optimize,no_auto_possess
4493\= Expect no match
4494    XY\n
4495No match
4496    XYY
4497No match
4498
4499/^X\v+?Z/utf,no_start_optimize,no_auto_possess
4500\= Expect no match
4501    X\n\n
4502No match
4503    X\nY
4504No match
4505
4506/^X\D+?Z/utf,no_start_optimize,no_auto_possess
4507\= Expect no match
4508    XY9
4509No match
4510    XYY
4511No match
4512
4513/^X\d+?Z/utf,no_start_optimize,no_auto_possess
4514\= Expect no match
4515    X99
4516No match
4517    X9Y
4518No match
4519
4520/^X\S+?Z/utf,no_start_optimize,no_auto_possess
4521\= Expect no match
4522    XY\n
4523No match
4524    XYY
4525No match
4526
4527/^X\s+?Z/utf,no_start_optimize,no_auto_possess
4528\= Expect no match
4529    X\n\n
4530No match
4531    X\nY
4532No match
4533
4534/^X\W+?Z/utf,no_start_optimize,no_auto_possess
4535\= Expect no match
4536    X.A
4537No match
4538    X++
4539No match
4540
4541/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess
4542\= Expect no match
4543    XY
4544No match
4545    XY!
4546No match
4547
4548/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess
4549\= Expect no match
4550    XY
4551No match
4552
4553/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess
4554\= Expect no match
4555    XY
4556No match
4557
4558/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess
4559\= Expect no match
4560    XYY
4561No match
4562
4563/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess
4564\= Expect no match
4565    X$
4566No match
4567
4568# ----------------------------------------------------------------------
4569# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option.
4570
4571/\x{d800}/B,utf,bad_escape_is_literal
4572------------------------------------------------------------------
4573        Bra
4574        x{d800}
4575        Ket
4576        End
4577------------------------------------------------------------------
4578
4579/\ud800/B,utf,alt_bsux,bad_escape_is_literal
4580------------------------------------------------------------------
4581        Bra
4582        ud800
4583        Ket
4584        End
4585------------------------------------------------------------------
4586
4587# ----------------------------------------------------------------------
4588
4589/Aሴ+B/literal,utf,no_utf_check
4590    Aሴ+B
4591 0: A\x{1234}+B
4592
4593# These are here because I upgraded to Unicode 10.0.0 before Perl did, so it
4594# doesn't recognize all these scripts. In time these three tests can be moved
4595# to test 4.
4596
4597/^(\p{Adlam}+)(\p{Bhaiksuki}+)(\p{Marchen}+)(\p{Newa}+)(\p{Osage}+)
4598  (\p{Tangut}+)(\p{Masaram_Gondi}+)(\p{Nushu}+)(\p{Soyombo}+)
4599  (\p{Zanabazar_Square}+)/x,utf
4600    \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}
4601 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}
4602 1: \x{1e900}\x{1e924}\x{1e953}
4603 2: \x{11c00}\x{11c2d}\x{11c3e}
4604 3: \x{11c70}\x{11c77}\x{11cab}
4605 4: \x{11400}\x{1142f}\x{11455}
4606 5: \x{104b0}\x{104d8}\x{104fb}
4607 6: \x{16fe0}\x{18800}\x{18af2}
4608 7: \x{11d00}\x{11d3a}\x{11d59}
4609 8: \x{16fe1}\x{1b170}\x{1b2fb}
4610 9: \x{11a50}\x{11a58}\x{11aa2}
461110: \x{11a00}\x{11a07}\x{11a47}
4612
4613/^\x{1E900}\x{104B0}/i,utf
4614    \x{1E900}\x{104B0}
4615 0: \x{1e900}\x{104b0}
4616    \x{1E922}\x{104D8}
4617 0: \x{1e922}\x{104d8}
4618
4619/^(?:(\X)(?C))+$/utf
4620    \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
4621Callout 0: last capture = 1
4622 1: \x{1e900}
4623Callout 0: last capture = 1
4624 1: \x{1e924}
4625Callout 0: last capture = 1
4626 1: \x{1e953}
4627Callout 0: last capture = 1
4628 1: \x{11c00}
4629Callout 0: last capture = 1
4630 1: \x{11c2d}\x{11c3e}
4631Callout 0: last capture = 1
4632 1: \x{11c70}
4633Callout 0: last capture = 1
4634 1: \x{11c77}\x{11cab}
4635Callout 0: last capture = 1
4636 1: \x{11400}
4637Callout 0: last capture = 1
4638 1: \x{1142f}
4639Callout 0: last capture = 1
4640 1: \x{11455}
4641Callout 0: last capture = 1
4642 1: \x{104b0}
4643Callout 0: last capture = 1
4644 1: \x{104d8}
4645Callout 0: last capture = 1
4646 1: \x{104fb}
4647Callout 0: last capture = 1
4648 1: \x{16fe0}
4649Callout 0: last capture = 1
4650 1: \x{18800}
4651Callout 0: last capture = 1
4652 1: \x{18af2}
4653Callout 0: last capture = 1
4654 1: \x{11d00}\x{11d3a}
4655Callout 0: last capture = 1
4656 1: \x{11d59}
4657Callout 0: last capture = 1
4658 1: \x{16fe1}
4659Callout 0: last capture = 1
4660 1: \x{1b170}
4661Callout 0: last capture = 1
4662 1: \x{1b2fb}
4663Callout 0: last capture = 1
4664 1: \x{11a50}\x{11a58}
4665Callout 0: last capture = 1
4666 1: \x{11aa2}
4667Callout 0: last capture = 1
4668 1: \x{11a00}\x{11a07}\x{11a47}
4669 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}
4670 1: \x{11a00}\x{11a07}\x{11a47}
4671
4672# Similarly for Unicode 11.0.0
4673
4674/^(\p{Dogra}+)(\p{Gunjala_Gondi}+)(\p{Hanifi_Rohingya}+)(\p{Makasar}+)
4675  (\p{Medefaidrin}+)(\p{Old_Sogdian}+)(\p{Sogdian}+)/x,utf
4676    \x{11800}\x{11da9}\x{10d27}\x{11ee0}\x{16e48}\x{10f27}\x{10f30}
4677 0: \x{11800}\x{11da9}\x{10d27}\x{11ee0}\x{16e48}\x{10f27}\x{10f30}
4678 1: \x{11800}
4679 2: \x{11da9}
4680 3: \x{10d27}
4681 4: \x{11ee0}
4682 5: \x{16e48}
4683 6: \x{10f27}
4684 7: \x{10f30}
4685
4686# These two are here because of differences from Perl.
4687
4688/^\X/utf
4689    A\x{200d}B                     A ZWJ
4690 0: A\x{200d}
4691    \x{261d}\x{261d}B              Extended_Pictographic Extended_Pictographic
4692 0: \x{261d}\x{261d}
4693    \x{261D}\x{1F3FB}B             Extended_Pictographic Extend
4694 0: \x{261d}\x{1f3fb}
4695    \x{1F1E6}\x{1F1E7}B            RegionalIndicator RegionalIndicator
4696 0: \x{1f1e6}\x{1f1e7}
4697    \x{261D}\x{1F3FB}\x{261d}B     Extended_Pictographic Extend E-P
4698 0: \x{261d}\x{1f3fb}\x{261d}
4699    \x{261D}\x{1F3FB}\x{200d}\x{261d}B     Extended_Pictographic Extend ZWJ E-P
4700 0: \x{261d}\x{1f3fb}\x{200d}\x{261d}
4701
4702# Regional indicators
4703
4704/^(\X)(\X)/utf,aftertext
4705    \x{1F1E6}\x{1F1E7}\x{1F1E7}B
4706 0: \x{1f1e6}\x{1f1e7}\x{1f1e7}
4707 0+ B
4708 1: \x{1f1e6}\x{1f1e7}
4709 2: \x{1f1e7}
4710    \x{1F1E6}\x{1F1E7}\x{1F1E7}\x{1F1E6}B
4711 0: \x{1f1e6}\x{1f1e7}\x{1f1e7}\x{1f1e6}
4712 0+ B
4713 1: \x{1f1e6}\x{1f1e7}
4714 2: \x{1f1e7}\x{1f1e6}
4715
4716# More differences from Perl
4717
4718/^[\p{Arabic}]/utf
4719\= Expect no match
4720    \x{650}
4721No match
4722    \x{651}
4723No match
4724    \x{652}
4725No match
4726    \x{653}
4727No match
4728    \x{654}
4729No match
4730    \x{655}
4731No match
4732
4733/^\p{Common}/utf
4734    \x{589}
4735 0: \x{589}
4736    \x{60c}
4737 0: \x{60c}
4738    \x{61f}
4739 0: \x{61f}
4740    \x{964}
4741 0: \x{964}
4742    \x{965}
4743 0: \x{965}
4744
4745/^\p{Inherited}/utf
4746    \x{64b}
4747 0: \x{64b}
4748    \x{654}
4749 0: \x{654}
4750    \x{655}
4751 0: \x{655}
4752    \x{1D1AA}
4753 0: \x{1d1aa}
4754
4755/\N{U+}/
4756Failed: error 193 at offset 2: \N{U+dddd} is supported only in Unicode (UTF) mode
4757
4758/\N{U+}/utf
4759Failed: error 178 at offset 5: digits missing in \x{} or \o{} or \N{U+}
4760
4761/\N{U}/
4762Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u
4763
4764# This tests the non-UTF Unicode NEL pattern whitespace character, only
4765# recognized by PCRE2 with /x when there is Unicode support.
4766
4767/A
4768
4769�B/x
4770    AB
4771 0: AB
4772
4773# This tests Unicode Pattern White Space characters in verb names when they
4774# are being processed with PCRE2_EXTENDED. Note: there are UTF-8 characters
4775# with code points greater than 255 between A, B, and C in the pattern.
4776
4777/(*: A‎B
C)abc/x,utf,mark,alt_verbnames
4778    abc
4779 0: abc
4780MK: ABC
4781
4782# End of testinput5
4783