new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / external / pcre2-10.32 / testdata / testoutput5
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}
25 No match
26     \x{2066}
27 No match
28     \x{2067}
29 No match
30     \x{2068}
31 No match
32     \x{2069}
33 No match
34
35 /^[[:print:]]+$/utf,ucp
36 \= Expect no match
37     \x{61c}
38 No match
39     \x{2066}
40 No match
41     \x{2067}
42 No match
43     \x{2068}
44 No match
45     \x{2069}
46 No 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}
82 No 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}
95 No match
96
97 # End of U+180E tests.
98
99 # ---------------------------------------------------------------------
100
101 /\x{110000}/IB,utf
102 Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
103
104 /\o{4200000}/IB,utf
105 Failed: error 134 at offset 10: character code point value in \x{} or \o{} is too large
106
107 /\x{ffffffff}/utf
108 Failed: error 134 at offset 11: character code point value in \x{} or \o{} is too large
109
110 /\o{37777777777}/utf
111 Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
112
113 /\x{100000000}/utf
114 Failed: error 134 at offset 12: character code point value in \x{} or \o{} is too large
115
116 /\o{77777777777}/utf
117 Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
118
119 /\x{d800}/utf
120 Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
121
122 /\o{154000}/utf
123 Failed: error 173 at offset 9: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
124
125 /\x{dfff}/utf
126 Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
127
128 /\o{157777}/utf
129 Failed: 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 ------------------------------------------------------------------
150 Capturing subpattern count = 0
151 Options: utf
152 First code unit = 'A'
153 Last code unit = '.'
154 Subject 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 ------------------------------------------------------------------
167 Capturing subpattern count = 0
168 Options: utf
169 Last code unit = 'X'
170 Subject 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 ------------------------------------------------------------------
182 Capturing subpattern count = 0
183 Options: utf
184 Subject 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 ------------------------------------------------------------------
196 Capturing subpattern count = 0
197 Compile options: utf
198 Overall options: anchored utf
199 Starting code units: a b 
200 Subject length lower bound = 1
201     bar
202  0: b
203 \= Expect no match
204     c
205 No match
206     \x{ff}
207 No match
208     \x{100}
209 No 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
232 No match
233
234 /\x{100}*/IB,utf
235 ------------------------------------------------------------------
236         Bra
237         \x{100}*+
238         Ket
239         End
240 ------------------------------------------------------------------
241 Capturing subpattern count = 0
242 May match empty string
243 Options: utf
244 Subject length lower bound = 0
245
246 /a\x{100}*/IB,utf
247 ------------------------------------------------------------------
248         Bra
249         a
250         \x{100}*+
251         Ket
252         End
253 ------------------------------------------------------------------
254 Capturing subpattern count = 0
255 Options: utf
256 First code unit = 'a'
257 Subject length lower bound = 1
258
259 /ab\x{100}*/IB,utf
260 ------------------------------------------------------------------
261         Bra
262         ab
263         \x{100}*+
264         Ket
265         End
266 ------------------------------------------------------------------
267 Capturing subpattern count = 0
268 Options: utf
269 First code unit = 'a'
270 Last code unit = 'b'
271 Subject length lower bound = 2
272
273 /[\x{200}-\x{100}]/utf
274 Failed: 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}
283 No match
284     \x{ff}
285 No match
286
287 /[\xFF]/IB
288 ------------------------------------------------------------------
289         Bra
290         \x{ff}
291         Ket
292         End
293 ------------------------------------------------------------------
294 Capturing subpattern count = 0
295 First code unit = \xff
296 Subject length lower bound = 1
297     >\xff<
298  0: \xff
299
300 /[^\xFF]/IB
301 ------------------------------------------------------------------
302         Bra
303         [^\x{ff}]
304         Ket
305         End
306 ------------------------------------------------------------------
307 Capturing subpattern count = 0
308 Subject 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 ------------------------------------------------------------------
346 Capturing subpattern count = 1
347 Options: utf
348 Last code unit = 'z'
349 Subject 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 ------------------------------------------------------------------
366 Capturing subpattern count = 2
367 May match empty string
368 Options: utf
369 Subject 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 ------------------------------------------------------------------
397 Capturing subpattern count = 2
398 May match empty string
399 Options: utf
400 Subject 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 ------------------------------------------------------------------
417 Capturing subpattern count = 2
418 May match empty string
419 Options: utf
420 Subject 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 ------------------------------------------------------------------
448 Capturing subpattern count = 2
449 May match empty string
450 Options: utf
451 Subject 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 ------------------------------------------------------------------
474 Capturing subpattern count = 0
475 Compile options: no_start_optimize utf
476 Overall options: anchored no_start_optimize utf
477 Subject length lower bound = 0
478
479 /()()()()()()()()()()
480  ()()()()()()()()()()
481  ()()()()()()()()()()
482  ()()()()()()()()()()
483  A (x) (?41) B/x,utf
484     AxxB
485 Matched, 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: 
496 10: 
497 11: 
498 12: 
499 13: 
500 14: 
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
563 No 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
604 No 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
623 No match
624     a\r
625 No 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
634 No 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
645 No 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
654 No 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
665 No 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
716 Capturing subpattern count = 0
717 Options: utf
718 \R matches CR, LF, or CRLF
719 First code unit = 'a'
720 Last code unit = 'b'
721 Subject 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
730 No match
731     a\x0bb
732 No match
733
734 /a\Rb/I,bsr=unicode,utf
735 Capturing subpattern count = 0
736 Options: utf
737 \R matches any Unicode newline
738 First code unit = 'a'
739 Last code unit = 'b'
740 Subject 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
753 Capturing subpattern count = 0
754 Options: utf
755 \R matches CR, LF, or CRLF
756 First code unit = 'a'
757 Last code unit = 'b'
758 Subject 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
767 No match
768     a\x0bb
769 No match
770
771 /a\R?b/I,bsr=unicode,utf
772 Capturing subpattern count = 0
773 Options: utf
774 \R matches any Unicode newline
775 First code unit = 'a'
776 Last code unit = 'b'
777 Subject 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
794 No match
795     \x61\xe2\x80\xa9\x62
796 No match
797
798 /[[:a\x{100}b:]]/utf
799 Failed: 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
808 No 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
817 No 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
830 Partial match: X
831     Xa\=ps
832 Partial match: Xa
833     Xaa\=ps
834 Partial match: Xaa
835     Xaaa\=ps
836 Partial match: Xaaa
837     Xaaaa\=ps
838 Partial match: Xaaaa
839
840 /Xa{2,4}?b/utf
841     X\=ps
842 Partial match: X
843     Xa\=ps
844 Partial match: Xa
845     Xaa\=ps
846 Partial match: Xaa
847     Xaaa\=ps
848 Partial match: Xaaa
849     Xaaaa\=ps
850 Partial match: Xaaaa
851
852 /Xa{2,4}+b/utf
853     X\=ps
854 Partial match: X
855     Xa\=ps
856 Partial match: Xa
857     Xaa\=ps
858 Partial match: Xaa
859     Xaaa\=ps
860 Partial match: Xaaa
861     Xaaaa\=ps
862 Partial match: Xaaaa
863
864 /X\x{123}{2,4}b/utf
865     X\=ps
866 Partial match: X
867     X\x{123}\=ps
868 Partial match: X\x{123}
869     X\x{123}\x{123}\=ps
870 Partial match: X\x{123}\x{123}
871     X\x{123}\x{123}\x{123}\=ps
872 Partial match: X\x{123}\x{123}\x{123}
873     X\x{123}\x{123}\x{123}\x{123}\=ps
874 Partial match: X\x{123}\x{123}\x{123}\x{123}
875
876 /X\x{123}{2,4}?b/utf
877     X\=ps
878 Partial match: X
879     X\x{123}\=ps
880 Partial match: X\x{123}
881     X\x{123}\x{123}\=ps
882 Partial match: X\x{123}\x{123}
883     X\x{123}\x{123}\x{123}\=ps
884 Partial match: X\x{123}\x{123}\x{123}
885     X\x{123}\x{123}\x{123}\x{123}\=ps
886 Partial match: X\x{123}\x{123}\x{123}\x{123}
887
888 /X\x{123}{2,4}+b/utf
889     X\=ps
890 Partial match: X
891     X\x{123}\=ps
892 Partial match: X\x{123}
893     X\x{123}\x{123}\=ps
894 Partial match: X\x{123}\x{123}
895     X\x{123}\x{123}\x{123}\=ps
896 Partial match: X\x{123}\x{123}\x{123}
897     X\x{123}\x{123}\x{123}\x{123}\=ps
898 Partial 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
903 No match
904     X\x{123}x\=ps
905 No match
906     X\x{123}\x{123}x\=ps
907 No match
908     X\x{123}\x{123}\x{123}x\=ps
909 No match
910     X\x{123}\x{123}\x{123}\x{123}x\=ps
911 No match
912
913 /X\x{123}{2,4}?b/utf
914 \= Expect no match
915     Xx\=ps
916 No match
917     X\x{123}x\=ps
918 No match
919     X\x{123}\x{123}x\=ps
920 No match
921     X\x{123}\x{123}\x{123}x\=ps
922 No match
923     X\x{123}\x{123}\x{123}\x{123}x\=ps
924 No match
925
926 /X\x{123}{2,4}+b/utf
927 \= Expect no match
928     Xx\=ps
929 No match
930     X\x{123}x\=ps
931 No match
932     X\x{123}\x{123}x\=ps
933 No match
934     X\x{123}\x{123}\x{123}x\=ps
935 No match
936     X\x{123}\x{123}\x{123}\x{123}x\=ps
937 No match
938
939 /X\d{2,4}b/utf
940     X\=ps
941 Partial match: X
942     X3\=ps
943 Partial match: X3
944     X33\=ps
945 Partial match: X33
946     X333\=ps
947 Partial match: X333
948     X3333\=ps
949 Partial match: X3333
950
951 /X\d{2,4}?b/utf
952     X\=ps
953 Partial match: X
954     X3\=ps
955 Partial match: X3
956     X33\=ps
957 Partial match: X33
958     X333\=ps
959 Partial match: X333
960     X3333\=ps
961 Partial match: X3333
962
963 /X\d{2,4}+b/utf
964     X\=ps
965 Partial match: X
966     X3\=ps
967 Partial match: X3
968     X33\=ps
969 Partial match: X33
970     X333\=ps
971 Partial match: X333
972     X3333\=ps
973 Partial match: X3333
974
975 /X\D{2,4}b/utf
976     X\=ps
977 Partial match: X
978     Xa\=ps
979 Partial match: Xa
980     Xaa\=ps
981 Partial match: Xaa
982     Xaaa\=ps
983 Partial match: Xaaa
984     Xaaaa\=ps
985 Partial match: Xaaaa
986
987 /X\D{2,4}?b/utf
988     X\=ps
989 Partial match: X
990     Xa\=ps
991 Partial match: Xa
992     Xaa\=ps
993 Partial match: Xaa
994     Xaaa\=ps
995 Partial match: Xaaa
996     Xaaaa\=ps
997 Partial match: Xaaaa
998
999 /X\D{2,4}+b/utf
1000     X\=ps
1001 Partial match: X
1002     Xa\=ps
1003 Partial match: Xa
1004     Xaa\=ps
1005 Partial match: Xaa
1006     Xaaa\=ps
1007 Partial match: Xaaa
1008     Xaaaa\=ps
1009 Partial match: Xaaaa
1010
1011 /X\D{2,4}b/utf
1012     X\=ps
1013 Partial match: X
1014     X\x{123}\=ps
1015 Partial match: X\x{123}
1016     X\x{123}\x{123}\=ps
1017 Partial match: X\x{123}\x{123}
1018     X\x{123}\x{123}\x{123}\=ps
1019 Partial match: X\x{123}\x{123}\x{123}
1020     X\x{123}\x{123}\x{123}\x{123}\=ps
1021 Partial match: X\x{123}\x{123}\x{123}\x{123}
1022
1023 /X\D{2,4}?b/utf
1024     X\=ps
1025 Partial match: X
1026     X\x{123}\=ps
1027 Partial match: X\x{123}
1028     X\x{123}\x{123}\=ps
1029 Partial match: X\x{123}\x{123}
1030     X\x{123}\x{123}\x{123}\=ps
1031 Partial match: X\x{123}\x{123}\x{123}
1032     X\x{123}\x{123}\x{123}\x{123}\=ps
1033 Partial match: X\x{123}\x{123}\x{123}\x{123}
1034
1035 /X\D{2,4}+b/utf
1036     X\=ps
1037 Partial match: X
1038     X\x{123}\=ps
1039 Partial match: X\x{123}
1040     X\x{123}\x{123}\=ps
1041 Partial match: X\x{123}\x{123}
1042     X\x{123}\x{123}\x{123}\=ps
1043 Partial match: X\x{123}\x{123}\x{123}
1044     X\x{123}\x{123}\x{123}\x{123}\=ps
1045 Partial match: X\x{123}\x{123}\x{123}\x{123}
1046
1047 /X[abc]{2,4}b/utf
1048     X\=ps
1049 Partial match: X
1050     Xa\=ps
1051 Partial match: Xa
1052     Xaa\=ps
1053 Partial match: Xaa
1054     Xaaa\=ps
1055 Partial match: Xaaa
1056     Xaaaa\=ps
1057 Partial match: Xaaaa
1058
1059 /X[abc]{2,4}?b/utf
1060     X\=ps
1061 Partial match: X
1062     Xa\=ps
1063 Partial match: Xa
1064     Xaa\=ps
1065 Partial match: Xaa
1066     Xaaa\=ps
1067 Partial match: Xaaa
1068     Xaaaa\=ps
1069 Partial match: Xaaaa
1070
1071 /X[abc]{2,4}+b/utf
1072     X\=ps
1073 Partial match: X
1074     Xa\=ps
1075 Partial match: Xa
1076     Xaa\=ps
1077 Partial match: Xaa
1078     Xaaa\=ps
1079 Partial match: Xaaa
1080     Xaaaa\=ps
1081 Partial match: Xaaaa
1082
1083 /X[abc\x{123}]{2,4}b/utf
1084     X\=ps
1085 Partial match: X
1086     X\x{123}\=ps
1087 Partial match: X\x{123}
1088     X\x{123}\x{123}\=ps
1089 Partial match: X\x{123}\x{123}
1090     X\x{123}\x{123}\x{123}\=ps
1091 Partial match: X\x{123}\x{123}\x{123}
1092     X\x{123}\x{123}\x{123}\x{123}\=ps
1093 Partial match: X\x{123}\x{123}\x{123}\x{123}
1094
1095 /X[abc\x{123}]{2,4}?b/utf
1096     X\=ps
1097 Partial match: X
1098     X\x{123}\=ps
1099 Partial match: X\x{123}
1100     X\x{123}\x{123}\=ps
1101 Partial match: X\x{123}\x{123}
1102     X\x{123}\x{123}\x{123}\=ps
1103 Partial match: X\x{123}\x{123}\x{123}
1104     X\x{123}\x{123}\x{123}\x{123}\=ps
1105 Partial match: X\x{123}\x{123}\x{123}\x{123}
1106
1107 /X[abc\x{123}]{2,4}+b/utf
1108     X\=ps
1109 Partial match: X
1110     X\x{123}\=ps
1111 Partial match: X\x{123}
1112     X\x{123}\x{123}\=ps
1113 Partial match: X\x{123}\x{123}
1114     X\x{123}\x{123}\x{123}\=ps
1115 Partial match: X\x{123}\x{123}\x{123}
1116     X\x{123}\x{123}\x{123}\x{123}\=ps
1117 Partial match: X\x{123}\x{123}\x{123}\x{123}
1118
1119 /X[^a]{2,4}b/utf
1120     X\=ps
1121 Partial match: X
1122     Xz\=ps
1123 Partial match: Xz
1124     Xzz\=ps
1125 Partial match: Xzz
1126     Xzzz\=ps
1127 Partial match: Xzzz
1128     Xzzzz\=ps
1129 Partial match: Xzzzz
1130
1131 /X[^a]{2,4}?b/utf
1132     X\=ps
1133 Partial match: X
1134     Xz\=ps
1135 Partial match: Xz
1136     Xzz\=ps
1137 Partial match: Xzz
1138     Xzzz\=ps
1139 Partial match: Xzzz
1140     Xzzzz\=ps
1141 Partial match: Xzzzz
1142
1143 /X[^a]{2,4}+b/utf
1144     X\=ps
1145 Partial match: X
1146     Xz\=ps
1147 Partial match: Xz
1148     Xzz\=ps
1149 Partial match: Xzz
1150     Xzzz\=ps
1151 Partial match: Xzzz
1152     Xzzzz\=ps
1153 Partial match: Xzzzz
1154
1155 /X[^a]{2,4}b/utf
1156     X\=ps
1157 Partial match: X
1158     X\x{123}\=ps
1159 Partial match: X\x{123}
1160     X\x{123}\x{123}\=ps
1161 Partial match: X\x{123}\x{123}
1162     X\x{123}\x{123}\x{123}\=ps
1163 Partial match: X\x{123}\x{123}\x{123}
1164     X\x{123}\x{123}\x{123}\x{123}\=ps
1165 Partial match: X\x{123}\x{123}\x{123}\x{123}
1166
1167 /X[^a]{2,4}?b/utf
1168     X\=ps
1169 Partial match: X
1170     X\x{123}\=ps
1171 Partial match: X\x{123}
1172     X\x{123}\x{123}\=ps
1173 Partial match: X\x{123}\x{123}
1174     X\x{123}\x{123}\x{123}\=ps
1175 Partial match: X\x{123}\x{123}\x{123}
1176     X\x{123}\x{123}\x{123}\x{123}\=ps
1177 Partial match: X\x{123}\x{123}\x{123}\x{123}
1178
1179 /X[^a]{2,4}+b/utf
1180     X\=ps
1181 Partial match: X
1182     X\x{123}\=ps
1183 Partial match: X\x{123}
1184     X\x{123}\x{123}\=ps
1185 Partial match: X\x{123}\x{123}
1186     X\x{123}\x{123}\x{123}\=ps
1187 Partial match: X\x{123}\x{123}\x{123}
1188     X\x{123}\x{123}\x{123}\x{123}\=ps
1189 Partial match: X\x{123}\x{123}\x{123}\x{123}
1190
1191 /(Y)X\1{2,4}b/utf
1192     YX\=ps
1193 Partial match: YX
1194     YXY\=ps
1195 Partial match: YXY
1196     YXYY\=ps
1197 Partial match: YXYY
1198     YXYYY\=ps
1199 Partial match: YXYYY
1200     YXYYYY\=ps
1201 Partial match: YXYYYY
1202
1203 /(Y)X\1{2,4}?b/utf
1204     YX\=ps
1205 Partial match: YX
1206     YXY\=ps
1207 Partial match: YXY
1208     YXYY\=ps
1209 Partial match: YXYY
1210     YXYYY\=ps
1211 Partial match: YXYYY
1212     YXYYYY\=ps
1213 Partial match: YXYYYY
1214
1215 /(Y)X\1{2,4}+b/utf
1216     YX\=ps
1217 Partial match: YX
1218     YXY\=ps
1219 Partial match: YXY
1220     YXYY\=ps
1221 Partial match: YXYY
1222     YXYYY\=ps
1223 Partial match: YXYYY
1224     YXYYYY\=ps
1225 Partial match: YXYYYY
1226
1227 /(\x{123})X\1{2,4}b/utf
1228     \x{123}X\=ps
1229 Partial match: \x{123}X
1230     \x{123}X\x{123}\=ps
1231 Partial match: \x{123}X\x{123}
1232     \x{123}X\x{123}\x{123}\=ps
1233 Partial match: \x{123}X\x{123}\x{123}
1234     \x{123}X\x{123}\x{123}\x{123}\=ps
1235 Partial match: \x{123}X\x{123}\x{123}\x{123}
1236     \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1237 Partial 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
1241 Partial match: \x{123}X
1242     \x{123}X\x{123}\=ps
1243 Partial match: \x{123}X\x{123}
1244     \x{123}X\x{123}\x{123}\=ps
1245 Partial match: \x{123}X\x{123}\x{123}
1246     \x{123}X\x{123}\x{123}\x{123}\=ps
1247 Partial match: \x{123}X\x{123}\x{123}\x{123}
1248     \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1249 Partial 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
1253 Partial match: \x{123}X
1254     \x{123}X\x{123}\=ps
1255 Partial match: \x{123}X\x{123}
1256     \x{123}X\x{123}\x{123}\=ps
1257 Partial match: \x{123}X\x{123}\x{123}
1258     \x{123}X\x{123}\x{123}\x{123}\=ps
1259 Partial match: \x{123}X\x{123}\x{123}\x{123}
1260     \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
1261 Partial 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
1267 Partial match: the cat
1268
1269 /abcd*/utf
1270     xxxxabcd\=ps
1271  0: abcd
1272     xxxxabcd\=ph
1273 Partial match: abcd
1274
1275 /abcd*/i,utf
1276     xxxxabcd\=ps
1277  0: abcd
1278     xxxxabcd\=ph
1279 Partial match: abcd
1280     XXXXABCD\=ps
1281  0: ABCD
1282     XXXXABCD\=ph
1283 Partial match: ABCD
1284
1285 /abc\d*/utf
1286     xxxxabc1\=ps
1287  0: abc1
1288     xxxxabc1\=ph
1289 Partial match: abc1
1290
1291 /(a)bc\1*/utf
1292     xxxxabca\=ps
1293  0: abca
1294  1: a
1295     xxxxabca\=ph
1296 Partial match: abca
1297
1298 /abc[de]*/utf
1299     xxxxabcde\=ps
1300  0: abcde
1301     xxxxabcde\=ph
1302 Partial match: abcde
1303
1304 /X\W{3}X/utf
1305     X\=ps
1306 Partial 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)\r(?'A'456)/Bx,newline=any,utf
1356 ------------------------------------------------------------------
1357         Bra
1358         \1
1359         xxx
1360         CBra 1
1361         456
1362         Ket
1363         Ket
1364         End
1365 ------------------------------------------------------------------
1366
1367 /\g{A}xxx#bх(?'A'123)\r(?'A'456)/Bx,newline=any,utf
1368 ------------------------------------------------------------------
1369         Bra
1370         \1
1371         xxx
1372         CBra 1
1373         456
1374         Ket
1375         Ket
1376         End
1377 ------------------------------------------------------------------
1378
1379 /^\cģ/utf
1380 Failed: error 168 at offset 3: \c must be followed by a printable ASCII character
1381
1382 /(\R*)(.)/s,utf
1383     \r\n
1384  0: \x{0d}
1385  1: 
1386  2: \x{0d}
1387     \r\r\n\n\r
1388  0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1389  1: \x{0d}\x{0d}\x{0a}\x{0a}
1390  2: \x{0d}
1391     \r\r\n\n\r\n
1392  0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1393  1: \x{0d}\x{0d}\x{0a}\x{0a}
1394  2: \x{0d}
1395
1396 /(\R)*(.)/s,utf
1397     \r\n
1398  0: \x{0d}
1399  1: <unset>
1400  2: \x{0d}
1401     \r\r\n\n\r
1402  0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1403  1: \x{0a}
1404  2: \x{0d}
1405     \r\r\n\n\r\n
1406  0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1407  1: \x{0a}
1408  2: \x{0d}
1409
1410 /[^\x{1234}]+/Ii,utf
1411 Capturing subpattern count = 0
1412 Options: caseless utf
1413 Subject length lower bound = 1
1414
1415 /[^\x{1234}]+?/Ii,utf
1416 Capturing subpattern count = 0
1417 Options: caseless utf
1418 Subject length lower bound = 1
1419
1420 /[^\x{1234}]++/Ii,utf
1421 Capturing subpattern count = 0
1422 Options: caseless utf
1423 Subject length lower bound = 1
1424
1425 /[^\x{1234}]{2}/Ii,utf
1426 Capturing subpattern count = 0
1427 Options: caseless utf
1428 Subject length lower bound = 2
1429
1430 /f.*/
1431     for\=ph
1432 Partial match: for
1433
1434 /f.*/s
1435     for\=ph
1436 Partial match: for
1437
1438 /f.*/utf
1439     for\=ph
1440 Partial match: for
1441
1442 /f.*/s,utf
1443     for\=ph
1444 Partial match: for
1445
1446 /\x{d7ff}\x{e000}/utf
1447
1448 /\x{d800}/utf
1449 Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1450
1451 /\x{dfff}/utf
1452 Failed: error 173 at offset 7: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1453
1454 /\h+/utf
1455     \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1456  0: \x{1680}\x{2000}\x{202f}\x{3000}
1457     \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1458  0: \x{200a}\x{a0}\x{2000}
1459
1460 /[\h\x{e000}]+/B,utf
1461 ------------------------------------------------------------------
1462         Bra
1463         [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]++
1464         Ket
1465         End
1466 ------------------------------------------------------------------
1467     \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
1468  0: \x{1680}\x{2000}\x{202f}\x{3000}
1469     \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
1470  0: \x{200a}\x{a0}\x{2000}
1471
1472 /\H+/utf
1473     \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1474  0: \x{167f}\x{1681}\x{180d}\x{180f}
1475     \x{2000}\x{200a}\x{1fff}\x{200b}
1476  0: \x{1fff}\x{200b}
1477     \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1478  0: \x{202e}\x{2030}\x{205e}\x{2060}
1479     \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1480  0: \x{9f}\x{a1}\x{2fff}\x{3001}
1481
1482 /[\H\x{d7ff}]+/B,utf
1483 ------------------------------------------------------------------
1484         Bra
1485         [\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}]++
1486         Ket
1487         End
1488 ------------------------------------------------------------------
1489     \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
1490  0: \x{167f}\x{1681}\x{180d}\x{180f}
1491     \x{2000}\x{200a}\x{1fff}\x{200b}
1492  0: \x{1fff}\x{200b}
1493     \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
1494  0: \x{202e}\x{2030}\x{205e}\x{2060}
1495     \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
1496  0: \x{9f}\x{a1}\x{2fff}\x{3001}
1497
1498 /\v+/utf
1499     \x{2027}\x{2030}\x{2028}\x{2029}
1500  0: \x{2028}\x{2029}
1501     \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1502  0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1503
1504 /[\v\x{e000}]+/B,utf
1505 ------------------------------------------------------------------
1506         Bra
1507         [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]++
1508         Ket
1509         End
1510 ------------------------------------------------------------------
1511     \x{2027}\x{2030}\x{2028}\x{2029}
1512  0: \x{2028}\x{2029}
1513     \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1514  0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1515
1516 /\V+/utf
1517     \x{2028}\x{2029}\x{2027}\x{2030}
1518  0: \x{2027}\x{2030}
1519     \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1520  0: \x{09}\x{0e}\x{84}\x{86}
1521
1522 /[\V\x{d7ff}]+/B,utf
1523 ------------------------------------------------------------------
1524         Bra
1525         [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]++
1526         Ket
1527         End
1528 ------------------------------------------------------------------
1529     \x{2028}\x{2029}\x{2027}\x{2030}
1530  0: \x{2027}\x{2030}
1531     \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
1532  0: \x{09}\x{0e}\x{84}\x{86}
1533
1534 /\R+/bsr=unicode,utf
1535     \x{2027}\x{2030}\x{2028}\x{2029}
1536  0: \x{2028}\x{2029}
1537     \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
1538  0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
1539
1540 /(..)\1/utf
1541     ab\=ps
1542 Partial match: ab
1543     aba\=ps
1544 Partial match: aba
1545     abab\=ps
1546  0: abab
1547  1: ab
1548
1549 /(..)\1/i,utf
1550     ab\=ps
1551 Partial match: ab
1552     abA\=ps
1553 Partial match: abA
1554     aBAb\=ps
1555  0: aBAb
1556  1: aB
1557
1558 /(..)\1{2,}/utf
1559     ab\=ps
1560 Partial match: ab
1561     aba\=ps
1562 Partial match: aba
1563     abab\=ps
1564 Partial match: abab
1565     ababa\=ps
1566 Partial match: ababa
1567     ababab\=ps
1568  0: ababab
1569  1: ab
1570     ababab\=ph
1571 Partial match: ababab
1572     abababa\=ps
1573  0: ababab
1574  1: ab
1575     abababa\=ph
1576 Partial match: abababa
1577
1578 /(..)\1{2,}/i,utf
1579     ab\=ps
1580 Partial match: ab
1581     aBa\=ps
1582 Partial match: aBa
1583     aBAb\=ps
1584 Partial match: aBAb
1585     AbaBA\=ps
1586 Partial match: AbaBA
1587     abABAb\=ps
1588  0: abABAb
1589  1: ab
1590     aBAbaB\=ph
1591 Partial match: aBAbaB
1592     abABabA\=ps
1593  0: abABab
1594  1: ab
1595     abaBABa\=ph
1596 Partial match: abaBABa
1597
1598 /(..)\1{2,}?x/i,utf
1599     ab\=ps
1600 Partial match: ab
1601     abA\=ps
1602 Partial match: abA
1603     aBAb\=ps
1604 Partial match: aBAb
1605     abaBA\=ps
1606 Partial match: abaBA
1607     abAbaB\=ps
1608 Partial match: abAbaB
1609     abaBabA\=ps
1610 Partial match: abaBabA
1611     abAbABaBx\=ps
1612  0: abAbABaBx
1613  1: ab
1614
1615 /./utf,newline=crlf
1616     \r\=ps
1617  0: \x{0d}
1618     \r\=ph
1619 Partial match: \x{0d}
1620
1621 /.{2,3}/utf,newline=crlf
1622     \r\=ps
1623 Partial match: \x{0d}
1624     \r\=ph
1625 Partial match: \x{0d}
1626     \r\r\=ps
1627  0: \x{0d}\x{0d}
1628     \r\r\=ph
1629 Partial match: \x{0d}\x{0d}
1630     \r\r\r\=ps
1631  0: \x{0d}\x{0d}\x{0d}
1632     \r\r\r\=ph
1633 Partial match: \x{0d}\x{0d}\x{0d}
1634
1635 /.{2,3}?/utf,newline=crlf
1636     \r\=ps
1637 Partial match: \x{0d}
1638     \r\=ph
1639 Partial match: \x{0d}
1640     \r\r\=ps
1641  0: \x{0d}\x{0d}
1642     \r\r\=ph
1643 Partial match: \x{0d}\x{0d}
1644     \r\r\r\=ps
1645  0: \x{0d}\x{0d}
1646     \r\r\r\=ph
1647  0: \x{0d}\x{0d}
1648
1649 /[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/B,utf
1650 ------------------------------------------------------------------
1651         Bra
1652         [^\x{100}]
1653         [^\x{1234}]
1654         [^\x{ffff}]
1655         [^\x{10000}]
1656         [^\x{10ffff}]
1657         Ket
1658         End
1659 ------------------------------------------------------------------
1660
1661 /[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/Bi,utf
1662 ------------------------------------------------------------------
1663         Bra
1664      /i [^\x{100}]
1665      /i [^\x{1234}]
1666      /i [^\x{ffff}]
1667      /i [^\x{10000}]
1668      /i [^\x{10ffff}]
1669         Ket
1670         End
1671 ------------------------------------------------------------------
1672
1673 /[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/B,utf
1674 ------------------------------------------------------------------
1675         Bra
1676         [^\x{100}]*
1677         [^\x{10000}]+
1678         [^\x{10ffff}]??
1679         [^\x{8000}]{4}
1680         [^\x{8000}]*
1681         [^\x{7fff}]{2}
1682         [^\x{7fff}]{0,7}?
1683         [^\x{fffff}]{5}
1684         [^\x{fffff}]?+
1685         Ket
1686         End
1687 ------------------------------------------------------------------
1688
1689 /[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/Bi,utf
1690 ------------------------------------------------------------------
1691         Bra
1692      /i [^\x{100}]*
1693      /i [^\x{10000}]+
1694      /i [^\x{10ffff}]??
1695      /i [^\x{8000}]{4}
1696      /i [^\x{8000}]*
1697      /i [^\x{7fff}]{2}
1698      /i [^\x{7fff}]{0,7}?
1699      /i [^\x{fffff}]{5}
1700      /i [^\x{fffff}]?+
1701         Ket
1702         End
1703 ------------------------------------------------------------------
1704
1705 /(?<=\x{1234}\x{1234})\bxy/I,utf
1706 Capturing subpattern count = 0
1707 Max lookbehind = 2
1708 Options: utf
1709 First code unit = 'x'
1710 Last code unit = 'y'
1711 Subject length lower bound = 2
1712
1713 /(?<!^)ETA/utf
1714 \= Expect no match
1715     ETA
1716 No match
1717
1718 /\u0100/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1719 ------------------------------------------------------------------
1720         Bra
1721         \x{100}
1722         Ket
1723         End
1724 ------------------------------------------------------------------
1725
1726 /[\u0100-\u0200]/B,utf,alt_bsux,allow_empty_class,match_unset_backref
1727 ------------------------------------------------------------------
1728         Bra
1729         [\x{100}-\x{200}]
1730         Ket
1731         End
1732 ------------------------------------------------------------------
1733
1734 /\ud800/utf,alt_bsux,allow_empty_class,match_unset_backref
1735 Failed: error 173 at offset 6: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
1736
1737 /^a+[a\x{200}]/B,utf
1738 ------------------------------------------------------------------
1739         Bra
1740         ^
1741         a+
1742         [a\x{200}]
1743         Ket
1744         End
1745 ------------------------------------------------------------------
1746     aa
1747  0: aa
1748
1749 /[b-d\x{200}-\x{250}]*[ae-h]?#[\x{200}-\x{250}]{0,8}[\x00-\xff]*#[\x{200}-\x{250}]+[a-z]/B,utf
1750 ------------------------------------------------------------------
1751         Bra
1752         [b-d\x{200}-\x{250}]*+
1753         [ae-h]?+
1754         #
1755         [\x{200}-\x{250}]{0,8}+
1756         [\x00-\xff]*
1757         #
1758         [\x{200}-\x{250}]++
1759         [a-z]
1760         Ket
1761         End
1762 ------------------------------------------------------------------
1763
1764 /[\p{L}]/IB
1765 ------------------------------------------------------------------
1766         Bra
1767         [\p{L}]
1768         Ket
1769         End
1770 ------------------------------------------------------------------
1771 Capturing subpattern count = 0
1772 Subject length lower bound = 1
1773
1774 /[\p{^L}]/IB
1775 ------------------------------------------------------------------
1776         Bra
1777         [\P{L}]
1778         Ket
1779         End
1780 ------------------------------------------------------------------
1781 Capturing subpattern count = 0
1782 Subject length lower bound = 1
1783
1784 /[\P{L}]/IB
1785 ------------------------------------------------------------------
1786         Bra
1787         [\P{L}]
1788         Ket
1789         End
1790 ------------------------------------------------------------------
1791 Capturing subpattern count = 0
1792 Subject length lower bound = 1
1793
1794 /[\P{^L}]/IB
1795 ------------------------------------------------------------------
1796         Bra
1797         [\p{L}]
1798         Ket
1799         End
1800 ------------------------------------------------------------------
1801 Capturing subpattern count = 0
1802 Subject length lower bound = 1
1803
1804 /[abc\p{L}\x{0660}]/IB,utf
1805 ------------------------------------------------------------------
1806         Bra
1807         [a-c\p{L}\x{660}]
1808         Ket
1809         End
1810 ------------------------------------------------------------------
1811 Capturing subpattern count = 0
1812 Options: utf
1813 Subject length lower bound = 1
1814
1815 /[\p{Nd}]/IB,utf
1816 ------------------------------------------------------------------
1817         Bra
1818         [\p{Nd}]
1819         Ket
1820         End
1821 ------------------------------------------------------------------
1822 Capturing subpattern count = 0
1823 Options: utf
1824 Subject length lower bound = 1
1825     1234
1826  0: 1
1827
1828 /[\p{Nd}+-]+/IB,utf
1829 ------------------------------------------------------------------
1830         Bra
1831         [+\-\p{Nd}]++
1832         Ket
1833         End
1834 ------------------------------------------------------------------
1835 Capturing subpattern count = 0
1836 Options: utf
1837 Subject length lower bound = 1
1838     1234
1839  0: 1234
1840     12-34
1841  0: 12-34
1842     12+\x{661}-34
1843  0: 12+\x{661}-34
1844 \= Expect no match
1845     abcd
1846 No match
1847
1848 /(?:[\PPa*]*){8,}/
1849
1850 /[\P{Any}]/B
1851 ------------------------------------------------------------------
1852         Bra
1853         [\P{Any}]
1854         Ket
1855         End
1856 ------------------------------------------------------------------
1857
1858 /[\P{Any}\E]/B
1859 ------------------------------------------------------------------
1860         Bra
1861         [\P{Any}]
1862         Ket
1863         End
1864 ------------------------------------------------------------------
1865
1866 /(\P{Yi}+\277)/
1867
1868 /(\P{Yi}+\277)?/
1869
1870 /(?<=\P{Yi}{3}A)X/
1871
1872 /\p{Yi}+(\P{Yi}+)(?1)/
1873
1874 /(\P{Yi}{2}\277)?/
1875
1876 /[\P{Yi}A]/
1877
1878 /[\P{Yi}\P{Yi}\P{Yi}A]/
1879
1880 /[^\P{Yi}A]/
1881
1882 /[^\P{Yi}\P{Yi}\P{Yi}A]/
1883
1884 /(\P{Yi}*\277)*/
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}{0,3}\277)*/
1897
1898 /(\P{Yi}{0,3}?\277)*/
1899
1900 /(\p{Yi}{0,3}+\277)*/
1901
1902 /\p{Zl}{2,3}+/B,utf
1903 ------------------------------------------------------------------
1904         Bra
1905         prop Zl {2}
1906         prop Zl ?+
1907         Ket
1908         End
1909 ------------------------------------------------------------------
1910     


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