• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8
2    support, excluding Unicode properties. --/
3
4/\x{100}/8DZ
5------------------------------------------------------------------
6        Bra
7        \x{100}
8        Ket
9        End
10------------------------------------------------------------------
11Capturing subpattern count = 0
12Options: utf8
13First char = 196
14Need char = 128
15
16/\x{1000}/8DZ
17------------------------------------------------------------------
18        Bra
19        \x{1000}
20        Ket
21        End
22------------------------------------------------------------------
23Capturing subpattern count = 0
24Options: utf8
25First char = 225
26Need char = 128
27
28/\x{10000}/8DZ
29------------------------------------------------------------------
30        Bra
31        \x{10000}
32        Ket
33        End
34------------------------------------------------------------------
35Capturing subpattern count = 0
36Options: utf8
37First char = 240
38Need char = 128
39
40/\x{100000}/8DZ
41------------------------------------------------------------------
42        Bra
43        \x{100000}
44        Ket
45        End
46------------------------------------------------------------------
47Capturing subpattern count = 0
48Options: utf8
49First char = 244
50Need char = 128
51
52/\x{1000000}/8DZ
53------------------------------------------------------------------
54        Bra
55        \x{1000000}
56        Ket
57        End
58------------------------------------------------------------------
59Capturing subpattern count = 0
60Options: utf8
61First char = 249
62Need char = 128
63
64/\x{4000000}/8DZ
65------------------------------------------------------------------
66        Bra
67        \x{4000000}
68        Ket
69        End
70------------------------------------------------------------------
71Capturing subpattern count = 0
72Options: utf8
73First char = 252
74Need char = 128
75
76/\x{7fffFFFF}/8DZ
77------------------------------------------------------------------
78        Bra
79        \x{7fffffff}
80        Ket
81        End
82------------------------------------------------------------------
83Capturing subpattern count = 0
84Options: utf8
85First char = 253
86Need char = 191
87
88/[\x{ff}]/8DZ
89------------------------------------------------------------------
90        Bra
91        \x{ff}
92        Ket
93        End
94------------------------------------------------------------------
95Capturing subpattern count = 0
96Options: utf8
97First char = 195
98Need char = 191
99
100/[\x{100}]/8DZ
101------------------------------------------------------------------
102        Bra
103        [\x{100}]
104        Ket
105        End
106------------------------------------------------------------------
107Capturing subpattern count = 0
108Options: utf8
109No first char
110No need char
111
112/\x{ffffffff}/8
113Failed: character value in \x{...} sequence is too large at offset 11
114
115/\x{100000000}/8
116Failed: character value in \x{...} sequence is too large at offset 12
117
118/^\x{100}a\x{1234}/8
119    \x{100}a\x{1234}bcd
120 0: \x{100}a\x{1234}
121
122/\x80/8DZ
123------------------------------------------------------------------
124        Bra
125        \x{80}
126        Ket
127        End
128------------------------------------------------------------------
129Capturing subpattern count = 0
130Options: utf8
131First char = 194
132Need char = 128
133
134/\xff/8DZ
135------------------------------------------------------------------
136        Bra
137        \x{ff}
138        Ket
139        End
140------------------------------------------------------------------
141Capturing subpattern count = 0
142Options: utf8
143First char = 195
144Need char = 191
145
146/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
147------------------------------------------------------------------
148        Bra
149        A\x{2262}\x{391}.
150        Ket
151        End
152------------------------------------------------------------------
153Capturing subpattern count = 0
154Options: utf8
155First char = 'A'
156Need char = '.'
157    \x{0041}\x{2262}\x{0391}\x{002e}
158 0: A\x{2262}\x{391}.
159
160/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
161------------------------------------------------------------------
162        Bra
163        \x{d55c}\x{ad6d}\x{c5b4}
164        Ket
165        End
166------------------------------------------------------------------
167Capturing subpattern count = 0
168Options: utf8
169First char = 237
170Need char = 180
171    \x{D55c}\x{ad6d}\x{C5B4}
172 0: \x{d55c}\x{ad6d}\x{c5b4}
173
174/\x{65e5}\x{672c}\x{8a9e}/DZ8
175------------------------------------------------------------------
176        Bra
177        \x{65e5}\x{672c}\x{8a9e}
178        Ket
179        End
180------------------------------------------------------------------
181Capturing subpattern count = 0
182Options: utf8
183First char = 230
184Need char = 158
185    \x{65e5}\x{672c}\x{8a9e}
186 0: \x{65e5}\x{672c}\x{8a9e}
187
188/\x{80}/DZ8
189------------------------------------------------------------------
190        Bra
191        \x{80}
192        Ket
193        End
194------------------------------------------------------------------
195Capturing subpattern count = 0
196Options: utf8
197First char = 194
198Need char = 128
199
200/\x{084}/DZ8
201------------------------------------------------------------------
202        Bra
203        \x{84}
204        Ket
205        End
206------------------------------------------------------------------
207Capturing subpattern count = 0
208Options: utf8
209First char = 194
210Need char = 132
211
212/\x{104}/DZ8
213------------------------------------------------------------------
214        Bra
215        \x{104}
216        Ket
217        End
218------------------------------------------------------------------
219Capturing subpattern count = 0
220Options: utf8
221First char = 196
222Need char = 132
223
224/\x{861}/DZ8
225------------------------------------------------------------------
226        Bra
227        \x{861}
228        Ket
229        End
230------------------------------------------------------------------
231Capturing subpattern count = 0
232Options: utf8
233First char = 224
234Need char = 161
235
236/\x{212ab}/DZ8
237------------------------------------------------------------------
238        Bra
239        \x{212ab}
240        Ket
241        End
242------------------------------------------------------------------
243Capturing subpattern count = 0
244Options: utf8
245First char = 240
246Need char = 171
247
248/.{3,5}X/DZ8
249------------------------------------------------------------------
250        Bra
251        Any{3}
252        Any{0,2}
253        X
254        Ket
255        End
256------------------------------------------------------------------
257Capturing subpattern count = 0
258Options: utf8
259No first char
260Need char = 'X'
261    \x{212ab}\x{212ab}\x{212ab}\x{861}X
262 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
263
264
265/.{3,5}?/DZ8
266------------------------------------------------------------------
267        Bra
268        Any{3}
269        Any{0,2}?
270        Ket
271        End
272------------------------------------------------------------------
273Capturing subpattern count = 0
274Options: utf8
275No first char
276No need char
277    \x{212ab}\x{212ab}\x{212ab}\x{861}
278 0: \x{212ab}\x{212ab}\x{212ab}
279
280/(?<=\C)X/8
281Failed: \C not allowed in lookbehind assertion at offset 6
282
283/-- This one is here not because it's different to Perl, but because the way
284the captured single-byte is displayed. (In Perl it becomes a character, and you
285can't tell the difference.) --/
286
287/X(\C)(.*)/8
288    X\x{1234}
289 0: X\x{1234}
290 1: \xe1
291 2: \x88\xb4
292    X\nabc
293 0: X\x{0a}abc
294 1: \x{0a}
295 2: abc
296
297/-- This one is here because Perl gives out a grumbly error message (quite
298correctly, but that messes up comparisons). --/
299
300/a\Cb/8
301    *** Failers
302No match
303    a\x{100}b
304No match
305
306/^[ab]/8DZ
307------------------------------------------------------------------
308        Bra
309        ^
310        [ab]
311        Ket
312        End
313------------------------------------------------------------------
314Capturing subpattern count = 0
315Options: anchored utf8
316No first char
317No need char
318    bar
319 0: b
320    *** Failers
321No match
322    c
323No match
324    \x{ff}
325No match
326    \x{100}
327No match
328
329/^[^ab]/8DZ
330------------------------------------------------------------------
331        Bra
332        ^
333        [\x00-`c-\xff] (neg)
334        Ket
335        End
336------------------------------------------------------------------
337Capturing subpattern count = 0
338Options: anchored utf8
339No first char
340No need char
341    c
342 0: c
343    \x{ff}
344 0: \x{ff}
345    \x{100}
346 0: \x{100}
347    *** Failers
348 0: *
349    aaa
350No match
351
352/[^ab\xC0-\xF0]/8SDZ
353------------------------------------------------------------------
354        Bra
355        [\x00-`c-\xbf\xf1-\xff] (neg)
356        Ket
357        End
358------------------------------------------------------------------
359Capturing subpattern count = 0
360Options: utf8
361No first char
362No need char
363Subject length lower bound = 1
364Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
365  \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
366  \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
367  5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
368  Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
369  \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
370  \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
371  \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
372  \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
373  \xfe \xff
374    \x{f1}
375 0: \x{f1}
376    \x{bf}
377 0: \x{bf}
378    \x{100}
379 0: \x{100}
380    \x{1000}
381 0: \x{1000}
382    *** Failers
383 0: *
384    \x{c0}
385No match
386    \x{f0}
387No match
388
389/Ā{3,4}/8SDZ
390------------------------------------------------------------------
391        Bra
392        \x{100}{3}
393        \x{100}?
394        Ket
395        End
396------------------------------------------------------------------
397Capturing subpattern count = 0
398Options: utf8
399First char = 196
400Need char = 128
401Subject length lower bound = 3
402No set of starting bytes
403  \x{100}\x{100}\x{100}\x{100\x{100}
404 0: \x{100}\x{100}\x{100}
405
406/(\x{100}+|x)/8SDZ
407------------------------------------------------------------------
408        Bra
409        CBra 1
410        \x{100}+
411        Alt
412        x
413        Ket
414        Ket
415        End
416------------------------------------------------------------------
417Capturing subpattern count = 1
418Options: utf8
419No first char
420No need char
421Subject length lower bound = 1
422Starting byte set: x \xc4
423
424/(\x{100}*a|x)/8SDZ
425------------------------------------------------------------------
426        Bra
427        CBra 1
428        \x{100}*+
429        a
430        Alt
431        x
432        Ket
433        Ket
434        End
435------------------------------------------------------------------
436Capturing subpattern count = 1
437Options: utf8
438No first char
439No need char
440Subject length lower bound = 1
441Starting byte set: a x \xc4
442
443/(\x{100}{0,2}a|x)/8SDZ
444------------------------------------------------------------------
445        Bra
446        CBra 1
447        \x{100}{0,2}
448        a
449        Alt
450        x
451        Ket
452        Ket
453        End
454------------------------------------------------------------------
455Capturing subpattern count = 1
456Options: utf8
457No first char
458No need char
459Subject length lower bound = 1
460Starting byte set: a x \xc4
461
462/(\x{100}{1,2}a|x)/8SDZ
463------------------------------------------------------------------
464        Bra
465        CBra 1
466        \x{100}
467        \x{100}{0,1}
468        a
469        Alt
470        x
471        Ket
472        Ket
473        End
474------------------------------------------------------------------
475Capturing subpattern count = 1
476Options: utf8
477No first char
478No need char
479Subject length lower bound = 1
480Starting byte set: x \xc4
481
482/\x{100}*(\d+|"(?1)")/8
483    1234
484 0: 1234
485 1: 1234
486    "1234"
487 0: "1234"
488 1: "1234"
489    \x{100}1234
490 0: \x{100}1234
491 1: 1234
492    "\x{100}1234"
493 0: \x{100}1234
494 1: 1234
495    \x{100}\x{100}12ab
496 0: \x{100}\x{100}12
497 1: 12
498    \x{100}\x{100}"12"
499 0: \x{100}\x{100}"12"
500 1: "12"
501    *** Failers
502No match
503    \x{100}\x{100}abcd
504No match
505
506/\x{100}/8DZ
507------------------------------------------------------------------
508        Bra
509        \x{100}
510        Ket
511        End
512------------------------------------------------------------------
513Capturing subpattern count = 0
514Options: utf8
515First char = 196
516Need char = 128
517
518/\x{100}*/8DZ
519------------------------------------------------------------------
520        Bra
521        \x{100}*
522        Ket
523        End
524------------------------------------------------------------------
525Capturing subpattern count = 0
526Options: utf8
527No first char
528No need char
529
530/a\x{100}*/8DZ
531------------------------------------------------------------------
532        Bra
533        a
534        \x{100}*
535        Ket
536        End
537------------------------------------------------------------------
538Capturing subpattern count = 0
539Options: utf8
540First char = 'a'
541No need char
542
543/ab\x{100}*/8DZ
544------------------------------------------------------------------
545        Bra
546        ab
547        \x{100}*
548        Ket
549        End
550------------------------------------------------------------------
551Capturing subpattern count = 0
552Options: utf8
553First char = 'a'
554Need char = 'b'
555
556/a\x{100}\x{101}*/8DZ
557------------------------------------------------------------------
558        Bra
559        a\x{100}
560        \x{101}*
561        Ket
562        End
563------------------------------------------------------------------
564Capturing subpattern count = 0
565Options: utf8
566First char = 'a'
567Need char = 128
568
569/a\x{100}\x{101}+/8DZ
570------------------------------------------------------------------
571        Bra
572        a\x{100}
573        \x{101}+
574        Ket
575        End
576------------------------------------------------------------------
577Capturing subpattern count = 0
578Options: utf8
579First char = 'a'
580Need char = 129
581
582/\x{100}*A/8DZ
583------------------------------------------------------------------
584        Bra
585        \x{100}*+
586        A
587        Ket
588        End
589------------------------------------------------------------------
590Capturing subpattern count = 0
591Options: utf8
592No first char
593Need char = 'A'
594    A
595 0: A
596
597/\x{100}*\d(?R)/8DZ
598------------------------------------------------------------------
599        Bra
600        \x{100}*+
601        \d
602        Once
603        Recurse
604        Ket
605        Ket
606        End
607------------------------------------------------------------------
608Capturing subpattern count = 0
609Options: utf8
610No first char
611No need char
612
613/[^\x{c4}]/DZ
614------------------------------------------------------------------
615        Bra
616        [^\xc4]
617        Ket
618        End
619------------------------------------------------------------------
620Capturing subpattern count = 0
621No options
622No first char
623No need char
624
625/[^\x{c4}]/8DZ
626------------------------------------------------------------------
627        Bra
628        [\x00-\xc3\xc5-\xff] (neg)
629        Ket
630        End
631------------------------------------------------------------------
632Capturing subpattern count = 0
633Options: utf8
634No first char
635No need char
636
637/[\x{100}]/8DZ
638------------------------------------------------------------------
639        Bra
640        [\x{100}]
641        Ket
642        End
643------------------------------------------------------------------
644Capturing subpattern count = 0
645Options: utf8
646No first char
647No need char
648    \x{100}
649 0: \x{100}
650    Z\x{100}
651 0: \x{100}
652    \x{100}Z
653 0: \x{100}
654    *** Failers
655No match
656
657/[Z\x{100}]/8DZ
658------------------------------------------------------------------
659        Bra
660        [Z\x{100}]
661        Ket
662        End
663------------------------------------------------------------------
664Capturing subpattern count = 0
665Options: utf8
666No first char
667No need char
668    Z\x{100}
669 0: Z
670    \x{100}
671 0: \x{100}
672    \x{100}Z
673 0: \x{100}
674    *** Failers
675No match
676
677/[\x{200}-\x{100}]/8
678Failed: range out of order in character class at offset 15
679
680/[Ā-Ą]/8
681    \x{100}
682 0: \x{100}
683    \x{104}
684 0: \x{104}
685    *** Failers
686No match
687    \x{105}
688No match
689    \x{ff}
690No match
691
692/[z-\x{100}]/8DZ
693------------------------------------------------------------------
694        Bra
695        [z-\x{100}]
696        Ket
697        End
698------------------------------------------------------------------
699Capturing subpattern count = 0
700Options: utf8
701No first char
702No need char
703
704/[z\Qa-d]Ā\E]/8DZ
705------------------------------------------------------------------
706        Bra
707        [\-\]adz\x{100}]
708        Ket
709        End
710------------------------------------------------------------------
711Capturing subpattern count = 0
712Options: utf8
713No first char
714No need char
715    \x{100}
716 0: \x{100}
717    Ā
718 0: \x{100}
719
720/[\xFF]/DZ
721------------------------------------------------------------------
722        Bra
723        \xff
724        Ket
725        End
726------------------------------------------------------------------
727Capturing subpattern count = 0
728No options
729First char = 255
730No need char
731    >\xff<
732 0: \xff
733
734/[\xff]/DZ8
735------------------------------------------------------------------
736        Bra
737        \x{ff}
738        Ket
739        End
740------------------------------------------------------------------
741Capturing subpattern count = 0
742Options: utf8
743First char = 195
744Need char = 191
745    >\x{ff}<
746 0: \x{ff}
747
748/[^\xFF]/DZ
749------------------------------------------------------------------
750        Bra
751        [^\xff]
752        Ket
753        End
754------------------------------------------------------------------
755Capturing subpattern count = 0
756No options
757No first char
758No need char
759
760/[^\xff]/8DZ
761------------------------------------------------------------------
762        Bra
763        [\x00-\xfe] (neg)
764        Ket
765        End
766------------------------------------------------------------------
767Capturing subpattern count = 0
768Options: utf8
769No first char
770No need char
771
772/[Ä-Ü]/8
773    Ö # Matches without Study
774 0: \x{d6}
775    \x{d6}
776 0: \x{d6}
777
778/[Ä-Ü]/8S
779    Ö <-- Same with Study
780 0: \x{d6}
781    \x{d6}
782 0: \x{d6}
783
784/[\x{c4}-\x{dc}]/8
785    Ö # Matches without Study
786 0: \x{d6}
787    \x{d6}
788 0: \x{d6}
789
790/[\x{c4}-\x{dc}]/8S
791    Ö <-- Same with Study
792 0: \x{d6}
793    \x{d6}
794 0: \x{d6}
795
796/[�]/8
797Failed: invalid UTF-8 string at offset 2
798
799/�/8
800Failed: invalid UTF-8 string at offset 1
801
802/���xxx/8
803Failed: invalid UTF-8 string at offset 1
804
805/���xxx/8?DZ
806------------------------------------------------------------------
807        Bra
808        \X{c0}\X{c0}\X{c0}xxx
809        Ket
810        End
811------------------------------------------------------------------
812Capturing subpattern count = 0
813Options: utf8 no_utf8_check
814First char = 195
815Need char = 'x'
816
817/abc/8
818    �]
819Error -10
820821Error -10
822    ���
823Error -10
824    ���\?
825No match
826    \xe1\x88
827Error -10
828    \P\xe1\x88
829Error -10
830    \P\P\xe1\x88
831Error -25
832
833/anything/8
834    \xc0\x80
835Error -10
836    \xc1\x8f
837Error -10
838    \xe0\x9f\x80
839Error -10
840    \xf0\x8f\x80\x80
841Error -10
842    \xf8\x87\x80\x80\x80
843Error -10
844    \xfc\x83\x80\x80\x80\x80
845Error -10
846    \xfe\x80\x80\x80\x80\x80
847Error -10
848    \xff\x80\x80\x80\x80\x80
849Error -10
850    \xc3\x8f
851No match
852    \xe0\xaf\x80
853No match
854    \xe1\x80\x80
855No match
856    \xf0\x9f\x80\x80
857No match
858    \xf1\x8f\x80\x80
859No match
860    \xf8\x88\x80\x80\x80
861Error -10
862    \xf9\x87\x80\x80\x80
863Error -10
864    \xfc\x84\x80\x80\x80\x80
865Error -10
866    \xfd\x83\x80\x80\x80\x80
867Error -10
868    \?\xf8\x88\x80\x80\x80
869No match
870    \?\xf9\x87\x80\x80\x80
871No match
872    \?\xfc\x84\x80\x80\x80\x80
873No match
874    \?\xfd\x83\x80\x80\x80\x80
875No match
876
877/\x{100}abc(xyz(?1))/8DZ
878------------------------------------------------------------------
879        Bra
880        \x{100}abc
881        CBra 1
882        xyz
883        Once
884        Recurse
885        Ket
886        Ket
887        Ket
888        End
889------------------------------------------------------------------
890Capturing subpattern count = 1
891Options: utf8
892First char = 196
893Need char = 'z'
894
895/[^\x{100}]abc(xyz(?1))/8DZ
896------------------------------------------------------------------
897        Bra
898        [^\x{100}]
899        abc
900        CBra 1
901        xyz
902        Once
903        Recurse
904        Ket
905        Ket
906        Ket
907        End
908------------------------------------------------------------------
909Capturing subpattern count = 1
910Options: utf8
911No first char
912Need char = 'z'
913
914/[ab\x{100}]abc(xyz(?1))/8DZ
915------------------------------------------------------------------
916        Bra
917        [ab\x{100}]
918        abc
919        CBra 1
920        xyz
921        Once
922        Recurse
923        Ket
924        Ket
925        Ket
926        End
927------------------------------------------------------------------
928Capturing subpattern count = 1
929Options: utf8
930No first char
931Need char = 'z'
932
933/(\x{100}(b(?2)c))?/DZ8
934------------------------------------------------------------------
935        Bra
936        Brazero
937        CBra 1
938        \x{100}
939        CBra 2
940        b
941        Once
942        Recurse
943        Ket
944        c
945        Ket
946        Ket
947        Ket
948        End
949------------------------------------------------------------------
950Capturing subpattern count = 2
951Options: utf8
952No first char
953No need char
954
955/(\x{100}(b(?2)c)){0,2}/DZ8
956------------------------------------------------------------------
957        Bra
958        Brazero
959        Bra
960        CBra 1
961        \x{100}
962        CBra 2
963        b
964        Once
965        Recurse
966        Ket
967        c
968        Ket
969        Ket
970        Brazero
971        CBra 1
972        \x{100}
973        CBra 2
974        b
975        Once
976        Recurse
977        Ket
978        c
979        Ket
980        Ket
981        Ket
982        Ket
983        End
984------------------------------------------------------------------
985Capturing subpattern count = 2
986Options: utf8
987No first char
988No need char
989
990/(\x{100}(b(?1)c))?/DZ8
991------------------------------------------------------------------
992        Bra
993        Brazero
994        CBra 1
995        \x{100}
996        CBra 2
997        b
998        Once
999        Recurse
1000        Ket
1001        c
1002        Ket
1003        Ket
1004        Ket
1005        End
1006------------------------------------------------------------------
1007Capturing subpattern count = 2
1008Options: utf8
1009No first char
1010No need char
1011
1012/(\x{100}(b(?1)c)){0,2}/DZ8
1013------------------------------------------------------------------
1014        Bra
1015        Brazero
1016        Bra
1017        CBra 1
1018        \x{100}
1019        CBra 2
1020        b
1021        Once
1022        Recurse
1023        Ket
1024        c
1025        Ket
1026        Ket
1027        Brazero
1028        CBra 1
1029        \x{100}
1030        CBra 2
1031        b
1032        Once
1033        Recurse
1034        Ket
1035        c
1036        Ket
1037        Ket
1038        Ket
1039        Ket
1040        End
1041------------------------------------------------------------------
1042Capturing subpattern count = 2
1043Options: utf8
1044No first char
1045No need char
1046
1047/\W/8
1048    A.B
1049 0: .
1050    A\x{100}B
1051 0: \x{100}
1052
1053/\w/8
1054    \x{100}X
1055 0: X
1056
1057/a\x{1234}b/P8
1058    a\x{1234}b
1059 0: a\x{1234}b
1060
1061/^\ሴ/8DZ
1062------------------------------------------------------------------
1063        Bra
1064        ^
1065        \x{1234}
1066        Ket
1067        End
1068------------------------------------------------------------------
1069Capturing subpattern count = 0
1070Options: anchored utf8
1071No first char
1072No need char
1073
1074/\777/I
1075Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
1076
1077/\777/8I
1078Capturing subpattern count = 0
1079Options: utf8
1080First char = 199
1081Need char = 191
1082  \x{1ff}
1083 0: \x{1ff}
1084  \777
1085 0: \x{1ff}
1086
1087/\x{100}*\d/8DZ
1088------------------------------------------------------------------
1089        Bra
1090        \x{100}*+
1091        \d
1092        Ket
1093        End
1094------------------------------------------------------------------
1095Capturing subpattern count = 0
1096Options: utf8
1097No first char
1098No need char
1099
1100/\x{100}*\s/8DZ
1101------------------------------------------------------------------
1102        Bra
1103        \x{100}*+
1104        \s
1105        Ket
1106        End
1107------------------------------------------------------------------
1108Capturing subpattern count = 0
1109Options: utf8
1110No first char
1111No need char
1112
1113/\x{100}*\w/8DZ
1114------------------------------------------------------------------
1115        Bra
1116        \x{100}*+
1117        \w
1118        Ket
1119        End
1120------------------------------------------------------------------
1121Capturing subpattern count = 0
1122Options: utf8
1123No first char
1124No need char
1125
1126/\x{100}*\D/8DZ
1127------------------------------------------------------------------
1128        Bra
1129        \x{100}*
1130        \D
1131        Ket
1132        End
1133------------------------------------------------------------------
1134Capturing subpattern count = 0
1135Options: utf8
1136No first char
1137No need char
1138
1139/\x{100}*\S/8DZ
1140------------------------------------------------------------------
1141        Bra
1142        \x{100}*
1143        \S
1144        Ket
1145        End
1146------------------------------------------------------------------
1147Capturing subpattern count = 0
1148Options: utf8
1149No first char
1150No need char
1151
1152/\x{100}*\W/8DZ
1153------------------------------------------------------------------
1154        Bra
1155        \x{100}*
1156        \W
1157        Ket
1158        End
1159------------------------------------------------------------------
1160Capturing subpattern count = 0
1161Options: utf8
1162No first char
1163No need char
1164
1165/\x{100}+\x{200}/8DZ
1166------------------------------------------------------------------
1167        Bra
1168        \x{100}++
1169        \x{200}
1170        Ket
1171        End
1172------------------------------------------------------------------
1173Capturing subpattern count = 0
1174Options: utf8
1175First char = 196
1176Need char = 128
1177
1178/\x{100}+X/8DZ
1179------------------------------------------------------------------
1180        Bra
1181        \x{100}++
1182        X
1183        Ket
1184        End
1185------------------------------------------------------------------
1186Capturing subpattern count = 0
1187Options: utf8
1188First char = 196
1189Need char = 'X'
1190
1191/X+\x{200}/8DZ
1192------------------------------------------------------------------
1193        Bra
1194        X++
1195        \x{200}
1196        Ket
1197        End
1198------------------------------------------------------------------
1199Capturing subpattern count = 0
1200Options: utf8
1201First char = 'X'
1202Need char = 128
1203
1204/()()()()()()()()()()
1205 ()()()()()()()()()()
1206 ()()()()()()()()()()
1207 ()()()()()()()()()()
1208 A (x) (?41) B/8x
1209    AxxB
1210Matched, but too many substrings
1211 0: AxxB
1212 1:
1213 2:
1214 3:
1215 4:
1216 5:
1217 6:
1218 7:
1219 8:
1220 9:
122110:
122211:
122312:
122413:
122514:
1226
1227/^[\x{100}\E-\Q\E\x{150}]/BZ8
1228------------------------------------------------------------------
1229        Bra
1230        ^
1231        [\x{100}-\x{150}]
1232        Ket
1233        End
1234------------------------------------------------------------------
1235
1236/^[\QĀ\E-\QŐ\E]/BZ8
1237------------------------------------------------------------------
1238        Bra
1239        ^
1240        [\x{100}-\x{150}]
1241        Ket
1242        End
1243------------------------------------------------------------------
1244
1245/^[\QĀ\E-\QŐ\E/BZ8
1246Failed: missing terminating ] for character class at offset 15
1247
1248/^abc./mgx8<any>
1249    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
1250 0: abc1
1251 0: abc2
1252 0: abc3
1253 0: abc4
1254 0: abc5
1255 0: abc6
1256 0: abc7
1257 0: abc8
1258 0: abc9
1259
1260/abc.$/mgx8<any>
1261    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
1262 0: abc1
1263 0: abc2
1264 0: abc3
1265 0: abc4
1266 0: abc5
1267 0: abc6
1268 0: abc7
1269 0: abc8
1270 0: abc9
1271
1272/^a\Rb/8<bsr_unicode>
1273    a\nb
1274 0: a\x{0a}b
1275    a\rb
1276 0: a\x{0d}b
1277    a\r\nb
1278 0: a\x{0d}\x{0a}b
1279    a\x0bb
1280 0: a\x{0b}b
1281    a\x0cb
1282 0: a\x{0c}b
1283    a\x{85}b
1284 0: a\x{85}b
1285    a\x{2028}b
1286 0: a\x{2028}b
1287    a\x{2029}b
1288 0: a\x{2029}b
1289    ** Failers
1290No match
1291    a\n\rb
1292No match
1293
1294/^a\R*b/8<bsr_unicode>
1295    ab
1296 0: ab
1297    a\nb
1298 0: a\x{0a}b
1299    a\rb
1300 0: a\x{0d}b
1301    a\r\nb
1302 0: a\x{0d}\x{0a}b
1303    a\x0bb
1304 0: a\x{0b}b
1305    a\x0c\x{2028}\x{2029}b
1306 0: a\x{0c}\x{2028}\x{2029}b
1307    a\x{85}b
1308 0: a\x{85}b
1309    a\n\rb
1310 0: a\x{0a}\x{0d}b
1311    a\n\r\x{85}\x0cb
1312 0: a\x{0a}\x{0d}\x{85}\x{0c}b
1313
1314/^a\R+b/8<bsr_unicode>
1315    a\nb
1316 0: a\x{0a}b
1317    a\rb
1318 0: a\x{0d}b
1319    a\r\nb
1320 0: a\x{0d}\x{0a}b
1321    a\x0bb
1322 0: a\x{0b}b
1323    a\x0c\x{2028}\x{2029}b
1324 0: a\x{0c}\x{2028}\x{2029}b
1325    a\x{85}b
1326 0: a\x{85}b
1327    a\n\rb
1328 0: a\x{0a}\x{0d}b
1329    a\n\r\x{85}\x0cb
1330 0: a\x{0a}\x{0d}\x{85}\x{0c}b
1331    ** Failers
1332No match
1333    ab
1334No match
1335
1336/^a\R{1,3}b/8<bsr_unicode>
1337    a\nb
1338 0: a\x{0a}b
1339    a\n\rb
1340 0: a\x{0a}\x{0d}b
1341    a\n\r\x{85}b
1342 0: a\x{0a}\x{0d}\x{85}b
1343    a\r\n\r\nb
1344 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
1345    a\r\n\r\n\r\nb
1346 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
1347    a\n\r\n\rb
1348 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
1349    a\n\n\r\nb
1350 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
1351    ** Failers
1352No match
1353    a\n\n\n\rb
1354No match
1355    a\r
1356No match
1357
1358/\H\h\V\v/8
1359    X X\x0a
1360 0: X X\x{0a}
1361    X\x09X\x0b
1362 0: X\x{09}X\x{0b}
1363    ** Failers
1364No match
1365    \x{a0} X\x0a
1366No match
1367
1368/\H*\h+\V?\v{3,4}/8
1369    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
1370 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
1371    \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
1372 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
1373    \x09\x20\x{a0}\x0a\x0b\x0c
1374 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
1375    ** Failers
1376No match
1377    \x09\x20\x{a0}\x0a\x0b
1378No match
1379
1380/\H\h\V\v/8
1381    \x{3001}\x{3000}\x{2030}\x{2028}
1382 0: \x{3001}\x{3000}\x{2030}\x{2028}
1383    X\x{180e}X\x{85}
1384 0: X\x{180e}X\x{85}
1385    ** Failers
1386No match
1387    \x{2009} X\x0a
1388No match
1389
1390/\H*\h+\V?\v{3,4}/8
1391    \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
1392 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
1393    \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
1394 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
1395    \x09\x20\x{202f}\x0a\x0b\x0c
1396 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
1397    ** Failers
1398No match
1399    \x09\x{200a}\x{a0}\x{2028}\x0b
1400No match
1401
1402/[\h]/8BZ
1403------------------------------------------------------------------
1404        Bra
1405        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
1406        Ket
1407        End
1408------------------------------------------------------------------
1409    >\x{1680}
1410 0: \x{1680}
1411
1412/[\h]{3,}/8BZ
1413------------------------------------------------------------------
1414        Bra
1415        [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}
1416        Ket
1417        End
1418------------------------------------------------------------------
1419    >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
1420 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
1421
1422/[\v]/8BZ
1423------------------------------------------------------------------
1424        Bra
1425        [\x0a-\x0d\x85\x{2028}-\x{2029}]
1426        Ket
1427        End
1428------------------------------------------------------------------
1429
1430/[\H]/8BZ
1431------------------------------------------------------------------
1432        Bra
1433        [\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{7fffffff}]
1434        Ket
1435        End
1436------------------------------------------------------------------
1437
1438/[\V]/8BZ
1439------------------------------------------------------------------
1440        Bra
1441        [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{2029}-\x{7fffffff}]
1442        Ket
1443        End
1444------------------------------------------------------------------
1445
1446/.*$/8<any>
1447    \x{1ec5}
1448 0: \x{1ec5}
1449
1450/-- This tests the stricter UTF-8 check according to RFC 3629. --/
1451
1452/X/8
1453    \x{0}\x{d7ff}\x{e000}\x{10ffff}
1454No match
1455    \x{d800}
1456Error -10
1457    \x{d800}\?
1458No match
1459    \x{da00}
1460Error -10
1461    \x{da00}\?
1462No match
1463    \x{dfff}
1464Error -10
1465    \x{dfff}\?
1466No match
1467    \x{110000}
1468Error -10
1469    \x{110000}\?
1470No match
1471    \x{2000000}
1472Error -10
1473    \x{2000000}\?
1474No match
1475    \x{7fffffff}
1476Error -10
1477    \x{7fffffff}\?
1478No match
1479
1480/a\Rb/I8<bsr_anycrlf>
1481Capturing subpattern count = 0
1482Options: bsr_anycrlf utf8
1483First char = 'a'
1484Need char = 'b'
1485    a\rb
1486 0: a\x{0d}b
1487    a\nb
1488 0: a\x{0a}b
1489    a\r\nb
1490 0: a\x{0d}\x{0a}b
1491    ** Failers
1492No match
1493    a\x{85}b
1494No match
1495    a\x0bb
1496No match
1497
1498/a\Rb/I8<bsr_unicode>
1499Capturing subpattern count = 0
1500Options: bsr_unicode utf8
1501First char = 'a'
1502Need char = 'b'
1503    a\rb
1504 0: a\x{0d}b
1505    a\nb
1506 0: a\x{0a}b
1507    a\r\nb
1508 0: a\x{0d}\x{0a}b
1509    a\x{85}b
1510 0: a\x{85}b
1511    a\x0bb
1512 0: a\x{0b}b
1513    ** Failers
1514No match
1515    a\x{85}b\<bsr_anycrlf>
1516No match
1517    a\x0bb\<bsr_anycrlf>
1518No match
1519
1520/a\R?b/I8<bsr_anycrlf>
1521Capturing subpattern count = 0
1522Options: bsr_anycrlf utf8
1523First char = 'a'
1524Need char = 'b'
1525    a\rb
1526 0: a\x{0d}b
1527    a\nb
1528 0: a\x{0a}b
1529    a\r\nb
1530 0: a\x{0d}\x{0a}b
1531    ** Failers
1532No match
1533    a\x{85}b
1534No match
1535    a\x0bb
1536No match
1537
1538/a\R?b/I8<bsr_unicode>
1539Capturing subpattern count = 0
1540Options: bsr_unicode utf8
1541First char = 'a'
1542Need char = 'b'
1543    a\rb
1544 0: a\x{0d}b
1545    a\nb
1546 0: a\x{0a}b
1547    a\r\nb
1548 0: a\x{0d}\x{0a}b
1549    a\x{85}b
1550 0: a\x{85}b
1551    a\x0bb
1552 0: a\x{0b}b
1553    ** Failers
1554No match
1555    a\x{85}b\<bsr_anycrlf>
1556No match
1557    a\x0bb\<bsr_anycrlf>
1558No match
1559
1560/.*a.*=.b.*/8<ANY>
1561    QQQ\x{2029}ABCaXYZ=!bPQR
1562 0: ABCaXYZ=!bPQR
1563    ** Failers
1564No match
1565    a\x{2029}b
1566No match
1567    \x61\xe2\x80\xa9\x62
1568No match
1569
1570/[[:a\x{100}b:]]/8
1571Failed: unknown POSIX class name at offset 3
1572
1573/a[^]b/<JS>8
1574    a\x{1234}b
1575 0: a\x{1234}b
1576    a\nb
1577 0: a\x{0a}b
1578    ** Failers
1579No match
1580    ab
1581No match
1582
1583/a[^]+b/<JS>8
1584    aXb
1585 0: aXb
1586    a\nX\nX\x{1234}b
1587 0: a\x{0a}X\x{0a}X\x{1234}b
1588    ** Failers
1589No match
1590    ab
1591No match
1592
1593/(\x{de})\1/
1594    \x{de}\x{de}
1595 0: \xde\xde
1596 1: \xde
1597    \x{123}
1598** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
1599** Truncation will probably give the wrong result.
1600No match
1601
1602/X/8f<any>
1603    A\x{1ec5}ABCXYZ
1604 0: X
1605
1606/(*UTF8)\x{1234}/
1607  abcd\x{1234}pqr
1608 0: \x{1234}
1609
1610/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
1611Capturing subpattern count = 0
1612Options: bsr_unicode utf8
1613Forced newline sequence: CRLF
1614First char = 'a'
1615Need char = 'b'
1616
1617/Xa{2,4}b/8
1618    X\P
1619Partial match: X
1620    Xa\P
1621Partial match: Xa
1622    Xaa\P
1623Partial match: Xaa
1624    Xaaa\P
1625Partial match: Xaaa
1626    Xaaaa\P
1627Partial match: Xaaaa
1628
1629/Xa{2,4}?b/8
1630    X\P
1631Partial match: X
1632    Xa\P
1633Partial match: Xa
1634    Xaa\P
1635Partial match: Xaa
1636    Xaaa\P
1637Partial match: Xaaa
1638    Xaaaa\P
1639Partial match: Xaaaa
1640
1641/Xa{2,4}+b/8
1642    X\P
1643Partial match: X
1644    Xa\P
1645Partial match: Xa
1646    Xaa\P
1647Partial match: Xaa
1648    Xaaa\P
1649Partial match: Xaaa
1650    Xaaaa\P
1651Partial match: Xaaaa
1652
1653/X\x{123}{2,4}b/8
1654    X\P
1655Partial match: X
1656    X\x{123}\P
1657Partial match: X\x{123}
1658    X\x{123}\x{123}\P
1659Partial match: X\x{123}\x{123}
1660    X\x{123}\x{123}\x{123}\P
1661Partial match: X\x{123}\x{123}\x{123}
1662    X\x{123}\x{123}\x{123}\x{123}\P
1663Partial match: X\x{123}\x{123}\x{123}\x{123}
1664
1665/X\x{123}{2,4}?b/8
1666    X\P
1667Partial match: X
1668    X\x{123}\P
1669Partial match: X\x{123}
1670    X\x{123}\x{123}\P
1671Partial match: X\x{123}\x{123}
1672    X\x{123}\x{123}\x{123}\P
1673Partial match: X\x{123}\x{123}\x{123}
1674    X\x{123}\x{123}\x{123}\x{123}\P
1675Partial match: X\x{123}\x{123}\x{123}\x{123}
1676
1677/X\x{123}{2,4}+b/8
1678    X\P
1679Partial match: X
1680    X\x{123}\P
1681Partial match: X\x{123}
1682    X\x{123}\x{123}\P
1683Partial match: X\x{123}\x{123}
1684    X\x{123}\x{123}\x{123}\P
1685Partial match: X\x{123}\x{123}\x{123}
1686    X\x{123}\x{123}\x{123}\x{123}\P
1687Partial match: X\x{123}\x{123}\x{123}\x{123}
1688
1689/X\x{123}{2,4}b/8
1690    Xx\P
1691No match
1692    X\x{123}x\P
1693No match
1694    X\x{123}\x{123}x\P
1695No match
1696    X\x{123}\x{123}\x{123}x\P
1697No match
1698    X\x{123}\x{123}\x{123}\x{123}x\P
1699No match
1700
1701/X\x{123}{2,4}?b/8
1702    Xx\P
1703No match
1704    X\x{123}x\P
1705No match
1706    X\x{123}\x{123}x\P
1707No match
1708    X\x{123}\x{123}\x{123}x\P
1709No match
1710    X\x{123}\x{123}\x{123}\x{123}x\P
1711No match
1712
1713/X\x{123}{2,4}+b/8
1714    Xx\P
1715No match
1716    X\x{123}x\P
1717No match
1718    X\x{123}\x{123}x\P
1719No match
1720    X\x{123}\x{123}\x{123}x\P
1721No match
1722    X\x{123}\x{123}\x{123}\x{123}x\P
1723No match
1724
1725/X\d{2,4}b/8
1726    X\P
1727Partial match: X
1728    X3\P
1729Partial match: X3
1730    X33\P
1731Partial match: X33
1732    X333\P
1733Partial match: X333
1734    X3333\P
1735Partial match: X3333
1736
1737/X\d{2,4}?b/8
1738    X\P
1739Partial match: X
1740    X3\P
1741Partial match: X3
1742    X33\P
1743Partial match: X33
1744    X333\P
1745Partial match: X333
1746    X3333\P
1747Partial match: X3333
1748
1749/X\d{2,4}+b/8
1750    X\P
1751Partial match: X
1752    X3\P
1753Partial match: X3
1754    X33\P
1755Partial match: X33
1756    X333\P
1757Partial match: X333
1758    X3333\P
1759Partial match: X3333
1760
1761/X\D{2,4}b/8
1762    X\P
1763Partial match: X
1764    Xa\P
1765Partial match: Xa
1766    Xaa\P
1767Partial match: Xaa
1768    Xaaa\P
1769Partial match: Xaaa
1770    Xaaaa\P
1771Partial match: Xaaaa
1772
1773/X\D{2,4}?b/8
1774    X\P
1775Partial match: X
1776    Xa\P
1777Partial match: Xa
1778    Xaa\P
1779Partial match: Xaa
1780    Xaaa\P
1781Partial match: Xaaa
1782    Xaaaa\P
1783Partial match: Xaaaa
1784
1785/X\D{2,4}+b/8
1786    X\P
1787Partial match: X
1788    Xa\P
1789Partial match: Xa
1790    Xaa\P
1791Partial match: Xaa
1792    Xaaa\P
1793Partial match: Xaaa
1794    Xaaaa\P
1795Partial match: Xaaaa
1796
1797/X\D{2,4}b/8
1798    X\P
1799Partial match: X
1800    X\x{123}\P
1801Partial match: X\x{123}
1802    X\x{123}\x{123}\P
1803Partial match: X\x{123}\x{123}
1804    X\x{123}\x{123}\x{123}\P
1805Partial match: X\x{123}\x{123}\x{123}
1806    X\x{123}\x{123}\x{123}\x{123}\P
1807Partial match: X\x{123}\x{123}\x{123}\x{123}
1808
1809/X\D{2,4}?b/8
1810    X\P
1811Partial match: X
1812    X\x{123}\P
1813Partial match: X\x{123}
1814    X\x{123}\x{123}\P
1815Partial match: X\x{123}\x{123}
1816    X\x{123}\x{123}\x{123}\P
1817Partial match: X\x{123}\x{123}\x{123}
1818    X\x{123}\x{123}\x{123}\x{123}\P
1819Partial match: X\x{123}\x{123}\x{123}\x{123}
1820
1821/X\D{2,4}+b/8
1822    X\P
1823Partial match: X
1824    X\x{123}\P
1825Partial match: X\x{123}
1826    X\x{123}\x{123}\P
1827Partial match: X\x{123}\x{123}
1828    X\x{123}\x{123}\x{123}\P
1829Partial match: X\x{123}\x{123}\x{123}
1830    X\x{123}\x{123}\x{123}\x{123}\P
1831Partial match: X\x{123}\x{123}\x{123}\x{123}
1832
1833/X[abc]{2,4}b/8
1834    X\P
1835Partial match: X
1836    Xa\P
1837Partial match: Xa
1838    Xaa\P
1839Partial match: Xaa
1840    Xaaa\P
1841Partial match: Xaaa
1842    Xaaaa\P
1843Partial match: Xaaaa
1844
1845/X[abc]{2,4}?b/8
1846    X\P
1847Partial match: X
1848    Xa\P
1849Partial match: Xa
1850    Xaa\P
1851Partial match: Xaa
1852    Xaaa\P
1853Partial match: Xaaa
1854    Xaaaa\P
1855Partial match: Xaaaa
1856
1857/X[abc]{2,4}+b/8
1858    X\P
1859Partial match: X
1860    Xa\P
1861Partial match: Xa
1862    Xaa\P
1863Partial match: Xaa
1864    Xaaa\P
1865Partial match: Xaaa
1866    Xaaaa\P
1867Partial match: Xaaaa
1868
1869/X[abc\x{123}]{2,4}b/8
1870    X\P
1871Partial match: X
1872    X\x{123}\P
1873Partial match: X\x{123}
1874    X\x{123}\x{123}\P
1875Partial match: X\x{123}\x{123}
1876    X\x{123}\x{123}\x{123}\P
1877Partial match: X\x{123}\x{123}\x{123}
1878    X\x{123}\x{123}\x{123}\x{123}\P
1879Partial match: X\x{123}\x{123}\x{123}\x{123}
1880
1881/X[abc\x{123}]{2,4}?b/8
1882    X\P
1883Partial match: X
1884    X\x{123}\P
1885Partial match: X\x{123}
1886    X\x{123}\x{123}\P
1887Partial match: X\x{123}\x{123}
1888    X\x{123}\x{123}\x{123}\P
1889Partial match: X\x{123}\x{123}\x{123}
1890    X\x{123}\x{123}\x{123}\x{123}\P
1891Partial match: X\x{123}\x{123}\x{123}\x{123}
1892
1893/X[abc\x{123}]{2,4}+b/8
1894    X\P
1895Partial match: X
1896    X\x{123}\P
1897Partial match: X\x{123}
1898    X\x{123}\x{123}\P
1899Partial match: X\x{123}\x{123}
1900    X\x{123}\x{123}\x{123}\P
1901Partial match: X\x{123}\x{123}\x{123}
1902    X\x{123}\x{123}\x{123}\x{123}\P
1903Partial match: X\x{123}\x{123}\x{123}\x{123}
1904
1905/X[^a]{2,4}b/8
1906    X\P
1907Partial match: X
1908    Xz\P
1909Partial match: Xz
1910    Xzz\P
1911Partial match: Xzz
1912    Xzzz\P
1913Partial match: Xzzz
1914    Xzzzz\P
1915Partial match: Xzzzz
1916
1917/X[^a]{2,4}?b/8
1918    X\P
1919Partial match: X
1920    Xz\P
1921Partial match: Xz
1922    Xzz\P
1923Partial match: Xzz
1924    Xzzz\P
1925Partial match: Xzzz
1926    Xzzzz\P
1927Partial match: Xzzzz
1928
1929/X[^a]{2,4}+b/8
1930    X\P
1931Partial match: X
1932    Xz\P
1933Partial match: Xz
1934    Xzz\P
1935Partial match: Xzz
1936    Xzzz\P
1937Partial match: Xzzz
1938    Xzzzz\P
1939Partial match: Xzzzz
1940
1941/X[^a]{2,4}b/8
1942    X\P
1943Partial match: X
1944    X\x{123}\P
1945Partial match: X\x{123}
1946    X\x{123}\x{123}\P
1947Partial match: X\x{123}\x{123}
1948    X\x{123}\x{123}\x{123}\P
1949Partial match: X\x{123}\x{123}\x{123}
1950    X\x{123}\x{123}\x{123}\x{123}\P
1951Partial match: X\x{123}\x{123}\x{123}\x{123}
1952
1953/X[^a]{2,4}?b/8
1954    X\P
1955Partial match: X
1956    X\x{123}\P
1957Partial match: X\x{123}
1958    X\x{123}\x{123}\P
1959Partial match: X\x{123}\x{123}
1960    X\x{123}\x{123}\x{123}\P
1961Partial match: X\x{123}\x{123}\x{123}
1962    X\x{123}\x{123}\x{123}\x{123}\P
1963Partial match: X\x{123}\x{123}\x{123}\x{123}
1964
1965/X[^a]{2,4}+b/8
1966    X\P
1967Partial match: X
1968    X\x{123}\P
1969Partial match: X\x{123}
1970    X\x{123}\x{123}\P
1971Partial match: X\x{123}\x{123}
1972    X\x{123}\x{123}\x{123}\P
1973Partial match: X\x{123}\x{123}\x{123}
1974    X\x{123}\x{123}\x{123}\x{123}\P
1975Partial match: X\x{123}\x{123}\x{123}\x{123}
1976
1977/(Y)X\1{2,4}b/8
1978    YX\P
1979Partial match: YX
1980    YXY\P
1981Partial match: YXY
1982    YXYY\P
1983Partial match: YXYY
1984    YXYYY\P
1985Partial match: YXYYY
1986    YXYYYY\P
1987Partial match: YXYYYY
1988
1989/(Y)X\1{2,4}?b/8
1990    YX\P
1991Partial match: YX
1992    YXY\P
1993Partial match: YXY
1994    YXYY\P
1995Partial match: YXYY
1996    YXYYY\P
1997Partial match: YXYYY
1998    YXYYYY\P
1999Partial match: YXYYYY
2000
2001/(Y)X\1{2,4}+b/8
2002    YX\P
2003Partial match: YX
2004    YXY\P
2005Partial match: YXY
2006    YXYY\P
2007Partial match: YXYY
2008    YXYYY\P
2009Partial match: YXYYY
2010    YXYYYY\P
2011Partial match: YXYYYY
2012
2013/(\x{123})X\1{2,4}b/8
2014    \x{123}X\P
2015Partial match: \x{123}X
2016    \x{123}X\x{123}\P
2017Partial match: \x{123}X\x{123}
2018    \x{123}X\x{123}\x{123}\P
2019Partial match: \x{123}X\x{123}\x{123}
2020    \x{123}X\x{123}\x{123}\x{123}\P
2021Partial match: \x{123}X\x{123}\x{123}\x{123}
2022    \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2023Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2024
2025/(\x{123})X\1{2,4}?b/8
2026    \x{123}X\P
2027Partial match: \x{123}X
2028    \x{123}X\x{123}\P
2029Partial match: \x{123}X\x{123}
2030    \x{123}X\x{123}\x{123}\P
2031Partial match: \x{123}X\x{123}\x{123}
2032    \x{123}X\x{123}\x{123}\x{123}\P
2033Partial match: \x{123}X\x{123}\x{123}\x{123}
2034    \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2035Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2036
2037/(\x{123})X\1{2,4}+b/8
2038    \x{123}X\P
2039Partial match: \x{123}X
2040    \x{123}X\x{123}\P
2041Partial match: \x{123}X\x{123}
2042    \x{123}X\x{123}\x{123}\P
2043Partial match: \x{123}X\x{123}\x{123}
2044    \x{123}X\x{123}\x{123}\x{123}\P
2045Partial match: \x{123}X\x{123}\x{123}\x{123}
2046    \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2047Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2048
2049/\bthe cat\b/8
2050    the cat\P
2051 0: the cat
2052    the cat\P\P
2053Partial match: the cat
2054
2055/abcd*/8
2056    xxxxabcd\P
2057 0: abcd
2058    xxxxabcd\P\P
2059Partial match: abcd
2060
2061/abcd*/i8
2062    xxxxabcd\P
2063 0: abcd
2064    xxxxabcd\P\P
2065Partial match: abcd
2066    XXXXABCD\P
2067 0: ABCD
2068    XXXXABCD\P\P
2069Partial match: ABCD
2070
2071/abc\d*/8
2072    xxxxabc1\P
2073 0: abc1
2074    xxxxabc1\P\P
2075Partial match: abc1
2076
2077/(a)bc\1*/8
2078    xxxxabca\P
2079 0: abca
2080 1: a
2081    xxxxabca\P\P
2082Partial match: abca
2083
2084/abc[de]*/8
2085    xxxxabcde\P
2086 0: abcde
2087    xxxxabcde\P\P
2088Partial match: abcde
2089
2090/X\W{3}X/8
2091    \PX
2092Partial match: X
2093
2094/\h/SI
2095Capturing subpattern count = 0
2096No options
2097No first char
2098No need char
2099Subject length lower bound = 1
2100Starting byte set: \x09 \x20 \xa0
2101
2102/\h/SI8
2103Capturing subpattern count = 0
2104Options: utf8
2105No first char
2106No need char
2107Subject length lower bound = 1
2108Starting byte set: \x09 \x20 \xc2 \xe1 \xe2 \xe3
2109    ABC\x{09}
2110 0: \x{09}
2111    ABC\x{20}
2112 0:
2113    ABC\x{a0}
2114 0: \x{a0}
2115    ABC\x{1680}
2116 0: \x{1680}
2117    ABC\x{180e}
2118 0: \x{180e}
2119    ABC\x{2000}
2120 0: \x{2000}
2121    ABC\x{202f}
2122 0: \x{202f}
2123    ABC\x{205f}
2124 0: \x{205f}
2125    ABC\x{3000}
2126 0: \x{3000}
2127
2128/\v/SI
2129Capturing subpattern count = 0
2130No options
2131No first char
2132No need char
2133Subject length lower bound = 1
2134Starting byte set: \x0a \x0b \x0c \x0d \x85
2135
2136/\v/SI8
2137Capturing subpattern count = 0
2138Options: utf8
2139No first char
2140No need char
2141Subject length lower bound = 1
2142Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2143    ABC\x{0a}
2144 0: \x{0a}
2145    ABC\x{0b}
2146 0: \x{0b}
2147    ABC\x{0c}
2148 0: \x{0c}
2149    ABC\x{0d}
2150 0: \x{0d}
2151    ABC\x{85}
2152 0: \x{85}
2153    ABC\x{2028}
2154 0: \x{2028}
2155
2156/\R/SI
2157Capturing subpattern count = 0
2158No options
2159No first char
2160No need char
2161Subject length lower bound = 2
2162Starting byte set: \x0a \x0b \x0c \x0d \x85
2163
2164/\R/SI8
2165Capturing subpattern count = 0
2166Options: utf8
2167No first char
2168No need char
2169Subject length lower bound = 2
2170Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2171
2172/\h*A/SI8
2173Capturing subpattern count = 0
2174Options: utf8
2175No first char
2176Need char = 'A'
2177Subject length lower bound = 1
2178Starting byte set: \x09 \x20 A \xc2 \xe1 \xe2 \xe3
2179    CDBABC
2180 0: A
2181
2182/\v+A/SI8
2183Capturing subpattern count = 0
2184Options: utf8
2185No first char
2186Need char = 'A'
2187Subject length lower bound = 2
2188Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2189
2190/\s?xxx\s/8SI
2191Capturing subpattern count = 0
2192Options: utf8
2193No first char
2194Need char = 'x'
2195Subject length lower bound = 4
2196Starting byte set: \x09 \x0a \x0c \x0d \x20 x
2197
2198/\sxxx\s/8T1
2199    AB\x{85}xxx\x{a0}XYZ
2200 0: \x{85}xxx\x{a0}
2201    AB\x{a0}xxx\x{85}XYZ
2202 0: \x{a0}xxx\x{85}
2203
2204/\sxxx\s/I8ST1
2205Capturing subpattern count = 0
2206Options: utf8
2207No first char
2208Need char = 'x'
2209Subject length lower bound = 5
2210Starting byte set: \x09 \x0a \x0c \x0d \x20 \xc2
2211    AB\x{85}xxx\x{a0}XYZ
2212 0: \x{85}xxx\x{a0}
2213    AB\x{a0}xxx\x{85}XYZ
2214 0: \x{a0}xxx\x{85}
2215
2216/\S \S/8T1
2217    \x{a2} \x{84}
2218 0: \x{a2} \x{84}
2219
2220/\S \S/I8ST1
2221Capturing subpattern count = 0
2222Options: utf8
2223No first char
2224Need char = ' '
2225Subject length lower bound = 3
2226Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0b \x0e
2227  \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d
2228  \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
2229  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e
2230  f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xc0 \xc1 \xc2 \xc3
2231  \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2
2232  \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1
2233  \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0
2234  \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff
2235    \x{a2} \x{84}
2236 0: \x{a2} \x{84}
2237    A Z
2238 0: A Z
2239
2240'A#хц'8x<any>BZ
2241------------------------------------------------------------------
2242        Bra
2243        A
2244        Ket
2245        End
2246------------------------------------------------------------------
2247
2248'A#хц
2249  PQ'8x<any>BZ
2250------------------------------------------------------------------
2251        Bra
2252        APQ
2253        Ket
2254        End
2255------------------------------------------------------------------
2256
2257/a+#хaa
2258  z#XX?/8x<any>BZ
2259------------------------------------------------------------------
2260        Bra
2261        a++
2262        z
2263        Ket
2264        End
2265------------------------------------------------------------------
2266
2267/a+#хaa
2268  z#х?/8x<any>BZ
2269------------------------------------------------------------------
2270        Bra
2271        a++
2272        z
2273        Ket
2274        End
2275------------------------------------------------------------------
2276
2277/\g{A}xxx#bXX(?'A'123)
2278(?'A'456)/8x<any>BZ
2279------------------------------------------------------------------
2280        Bra
2281        \1
2282        xxx
2283        CBra 1
2284        456
2285        Ket
2286        Ket
2287        End
2288------------------------------------------------------------------
2289
2290/\g{A}xxx#bх(?'A'123)
2291(?'A'456)/8x<any>BZ
2292------------------------------------------------------------------
2293        Bra
2294        \1
2295        xxx
2296        CBra 1
2297        456
2298        Ket
2299        Ket
2300        End
2301------------------------------------------------------------------
2302
2303/a+/8
2304    a\x{123}aa\>1
2305 0: aa
2306    a\x{123}aa\>2
2307Error -11
2308    a\x{123}aa\>3
2309 0: aa
2310    a\x{123}aa\>4
2311 0: a
2312    a\x{123}aa\>5
2313No match
2314    a\x{123}aa\>6
2315Error -24
2316
2317/^\cģ/8
2318Failed: \c must be followed by an ASCII character at offset 3
2319
2320/-- End of testinput5 --/
2321