blob: 1eaab47d2b280776ebe389b4e7068130c28c2b02 [file] [log] [blame]
Tristan Matthews04616462013-11-14 16:09:34 -05001/-- 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 Recurse
603 Ket
604 End
605------------------------------------------------------------------
606Capturing subpattern count = 0
607Options: utf8
608No first char
609No need char
610
611/[^\x{c4}]/DZ
612------------------------------------------------------------------
613 Bra
614 [^\xc4]
615 Ket
616 End
617------------------------------------------------------------------
618Capturing subpattern count = 0
619No options
620No first char
621No need char
622
623/[^\x{c4}]/8DZ
624------------------------------------------------------------------
625 Bra
626 [\x00-\xc3\xc5-\xff] (neg)
627 Ket
628 End
629------------------------------------------------------------------
630Capturing subpattern count = 0
631Options: utf8
632No first char
633No need char
634
635/[\x{100}]/8DZ
636------------------------------------------------------------------
637 Bra
638 [\x{100}]
639 Ket
640 End
641------------------------------------------------------------------
642Capturing subpattern count = 0
643Options: utf8
644No first char
645No need char
646 \x{100}
647 0: \x{100}
648 Z\x{100}
649 0: \x{100}
650 \x{100}Z
651 0: \x{100}
652 *** Failers
653No match
654
655/[Z\x{100}]/8DZ
656------------------------------------------------------------------
657 Bra
658 [Z\x{100}]
659 Ket
660 End
661------------------------------------------------------------------
662Capturing subpattern count = 0
663Options: utf8
664No first char
665No need char
666 Z\x{100}
667 0: Z
668 \x{100}
669 0: \x{100}
670 \x{100}Z
671 0: \x{100}
672 *** Failers
673No match
674
675/[\x{200}-\x{100}]/8
676Failed: range out of order in character class at offset 15
677
678/[Ā-Ą]/8
679 \x{100}
680 0: \x{100}
681 \x{104}
682 0: \x{104}
683 *** Failers
684No match
685 \x{105}
686No match
687 \x{ff}
688No match
689
690/[z-\x{100}]/8DZ
691------------------------------------------------------------------
692 Bra
693 [z-\x{100}]
694 Ket
695 End
696------------------------------------------------------------------
697Capturing subpattern count = 0
698Options: utf8
699No first char
700No need char
701
702/[z\Qa-d]Ā\E]/8DZ
703------------------------------------------------------------------
704 Bra
705 [\-\]adz\x{100}]
706 Ket
707 End
708------------------------------------------------------------------
709Capturing subpattern count = 0
710Options: utf8
711No first char
712No need char
713 \x{100}
714 0: \x{100}
715 Ā
716 0: \x{100}
717
718/[\xFF]/DZ
719------------------------------------------------------------------
720 Bra
721 \xff
722 Ket
723 End
724------------------------------------------------------------------
725Capturing subpattern count = 0
726No options
727First char = 255
728No need char
729 >\xff<
730 0: \xff
731
732/[\xff]/DZ8
733------------------------------------------------------------------
734 Bra
735 \x{ff}
736 Ket
737 End
738------------------------------------------------------------------
739Capturing subpattern count = 0
740Options: utf8
741First char = 195
742Need char = 191
743 >\x{ff}<
744 0: \x{ff}
745
746/[^\xFF]/DZ
747------------------------------------------------------------------
748 Bra
749 [^\xff]
750 Ket
751 End
752------------------------------------------------------------------
753Capturing subpattern count = 0
754No options
755No first char
756No need char
757
758/[^\xff]/8DZ
759------------------------------------------------------------------
760 Bra
761 [\x00-\xfe] (neg)
762 Ket
763 End
764------------------------------------------------------------------
765Capturing subpattern count = 0
766Options: utf8
767No first char
768No need char
769
770/[Ä-Ü]/8
771 Ö # Matches without Study
772 0: \x{d6}
773 \x{d6}
774 0: \x{d6}
775
776/[Ä-Ü]/8S
777 Ö <-- Same with Study
778 0: \x{d6}
779 \x{d6}
780 0: \x{d6}
781
782/[\x{c4}-\x{dc}]/8
783 Ö # Matches without Study
784 0: \x{d6}
785 \x{d6}
786 0: \x{d6}
787
788/[\x{c4}-\x{dc}]/8S
789 Ö <-- Same with Study
790 0: \x{d6}
791 \x{d6}
792 0: \x{d6}
793
794/[Ã]/8
795Failed: invalid UTF-8 string at offset 1
796
797/Ã/8
798Failed: invalid UTF-8 string at offset 0
799
800/ÃÃÃxxx/8
801Failed: invalid UTF-8 string at offset 0
802
803/ÃÃÃxxx/8?DZSS
804------------------------------------------------------------------
805 Bra
806 \X{c0}\X{c0}\X{c0}xxx
807 Ket
808 End
809------------------------------------------------------------------
810Capturing subpattern count = 0
811Options: utf8 no_utf8_check
812First char = 195
813Need char = 'x'
814
815/abc/8
816 Ã]
817Error -10 (bad UTF-8 string) offset=0 reason=6
818 Ã
819Error -10 (bad UTF-8 string) offset=0 reason=1
820 ÃÃÃ
821Error -10 (bad UTF-8 string) offset=0 reason=6
822 ÃÃÃ\?
823No match
824 \xe1\x88
825Error -10 (bad UTF-8 string) offset=0 reason=1
826 \P\xe1\x88
827Error -10 (bad UTF-8 string) offset=0 reason=1
828 \P\P\xe1\x88
829Error -25 (short UTF-8 string) offset=0 reason=1
830 XX\xea
831Error -10 (bad UTF-8 string) offset=2 reason=2
832 \O0XX\xea
833Error -10 (bad UTF-8 string)
834 \O1XX\xea
835Error -10 (bad UTF-8 string)
836 \O2XX\xea
837Error -10 (bad UTF-8 string) offset=2 reason=2
838 XX\xf1
839Error -10 (bad UTF-8 string) offset=2 reason=3
840 XX\xf8
841Error -10 (bad UTF-8 string) offset=2 reason=4
842 XX\xfc
843Error -10 (bad UTF-8 string) offset=2 reason=5
844 ZZ\xea\xaf\x20YY
845Error -10 (bad UTF-8 string) offset=2 reason=7
846 ZZ\xfd\xbf\xbf\x2f\xbf\xbfYY
847Error -10 (bad UTF-8 string) offset=2 reason=8
848 ZZ\xfd\xbf\xbf\xbf\x2f\xbfYY
849Error -10 (bad UTF-8 string) offset=2 reason=9
850 ZZ\xfd\xbf\xbf\xbf\xbf\x2fYY
851Error -10 (bad UTF-8 string) offset=2 reason=10
852 ZZ\xffYY
853Error -10 (bad UTF-8 string) offset=2 reason=21
854 ZZ\xfeYY
855Error -10 (bad UTF-8 string) offset=2 reason=21
856
857/anything/8
858 \xc0\x80
859Error -10 (bad UTF-8 string) offset=0 reason=15
860 \xc1\x8f
861Error -10 (bad UTF-8 string) offset=0 reason=15
862 \xe0\x9f\x80
863Error -10 (bad UTF-8 string) offset=0 reason=16
864 \xf0\x8f\x80\x80
865Error -10 (bad UTF-8 string) offset=0 reason=17
866 \xf8\x87\x80\x80\x80
867Error -10 (bad UTF-8 string) offset=0 reason=18
868 \xfc\x83\x80\x80\x80\x80
869Error -10 (bad UTF-8 string) offset=0 reason=19
870 \xfe\x80\x80\x80\x80\x80
871Error -10 (bad UTF-8 string) offset=0 reason=21
872 \xff\x80\x80\x80\x80\x80
873Error -10 (bad UTF-8 string) offset=0 reason=21
874 \xc3\x8f
875No match
876 \xe0\xaf\x80
877No match
878 \xe1\x80\x80
879No match
880 \xf0\x9f\x80\x80
881No match
882 \xf1\x8f\x80\x80
883No match
884 \xf8\x88\x80\x80\x80
885Error -10 (bad UTF-8 string) offset=0 reason=11
886 \xf9\x87\x80\x80\x80
887Error -10 (bad UTF-8 string) offset=0 reason=11
888 \xfc\x84\x80\x80\x80\x80
889Error -10 (bad UTF-8 string) offset=0 reason=12
890 \xfd\x83\x80\x80\x80\x80
891Error -10 (bad UTF-8 string) offset=0 reason=12
892 \?\xf8\x88\x80\x80\x80
893No match
894 \?\xf9\x87\x80\x80\x80
895No match
896 \?\xfc\x84\x80\x80\x80\x80
897No match
898 \?\xfd\x83\x80\x80\x80\x80
899No match
900
901/\x{100}abc(xyz(?1))/8DZ
902------------------------------------------------------------------
903 Bra
904 \x{100}abc
905 CBra 1
906 xyz
907 Recurse
908 Ket
909 Ket
910 End
911------------------------------------------------------------------
912Capturing subpattern count = 1
913Options: utf8
914First char = 196
915Need char = 'z'
916
917/[^\x{100}]abc(xyz(?1))/8DZ
918------------------------------------------------------------------
919 Bra
920 [^\x{100}]
921 abc
922 CBra 1
923 xyz
924 Recurse
925 Ket
926 Ket
927 End
928------------------------------------------------------------------
929Capturing subpattern count = 1
930Options: utf8
931No first char
932Need char = 'z'
933
934/[ab\x{100}]abc(xyz(?1))/8DZ
935------------------------------------------------------------------
936 Bra
937 [ab\x{100}]
938 abc
939 CBra 1
940 xyz
941 Recurse
942 Ket
943 Ket
944 End
945------------------------------------------------------------------
946Capturing subpattern count = 1
947Options: utf8
948No first char
949Need char = 'z'
950
951/(\x{100}(b(?2)c))?/DZ8
952------------------------------------------------------------------
953 Bra
954 Brazero
955 CBra 1
956 \x{100}
957 CBra 2
958 b
959 Recurse
960 c
961 Ket
962 Ket
963 Ket
964 End
965------------------------------------------------------------------
966Capturing subpattern count = 2
967Options: utf8
968No first char
969No need char
970
971/(\x{100}(b(?2)c)){0,2}/DZ8
972------------------------------------------------------------------
973 Bra
974 Brazero
975 Bra
976 CBra 1
977 \x{100}
978 CBra 2
979 b
980 Recurse
981 c
982 Ket
983 Ket
984 Brazero
985 CBra 1
986 \x{100}
987 CBra 2
988 b
989 Recurse
990 c
991 Ket
992 Ket
993 Ket
994 Ket
995 End
996------------------------------------------------------------------
997Capturing subpattern count = 2
998Options: utf8
999No first char
1000No need char
1001
1002/(\x{100}(b(?1)c))?/DZ8
1003------------------------------------------------------------------
1004 Bra
1005 Brazero
1006 CBra 1
1007 \x{100}
1008 CBra 2
1009 b
1010 Recurse
1011 c
1012 Ket
1013 Ket
1014 Ket
1015 End
1016------------------------------------------------------------------
1017Capturing subpattern count = 2
1018Options: utf8
1019No first char
1020No need char
1021
1022/(\x{100}(b(?1)c)){0,2}/DZ8
1023------------------------------------------------------------------
1024 Bra
1025 Brazero
1026 Bra
1027 CBra 1
1028 \x{100}
1029 CBra 2
1030 b
1031 Recurse
1032 c
1033 Ket
1034 Ket
1035 Brazero
1036 CBra 1
1037 \x{100}
1038 CBra 2
1039 b
1040 Recurse
1041 c
1042 Ket
1043 Ket
1044 Ket
1045 Ket
1046 End
1047------------------------------------------------------------------
1048Capturing subpattern count = 2
1049Options: utf8
1050No first char
1051No need char
1052
1053/\W/8
1054 A.B
1055 0: .
1056 A\x{100}B
1057 0: \x{100}
1058
1059/\w/8
1060 \x{100}X
1061 0: X
1062
1063/a\x{1234}b/P8
1064 a\x{1234}b
1065 0: a\x{1234}b
1066
1067/^\ሴ/8DZ
1068------------------------------------------------------------------
1069 Bra
1070 ^
1071 \x{1234}
1072 Ket
1073 End
1074------------------------------------------------------------------
1075Capturing subpattern count = 0
1076Options: anchored utf8
1077No first char
1078No need char
1079
1080/\777/I
1081Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
1082
1083/\777/8I
1084Capturing subpattern count = 0
1085Options: utf8
1086First char = 199
1087Need char = 191
1088 \x{1ff}
1089 0: \x{1ff}
1090 \777
1091 0: \x{1ff}
1092
1093/\x{100}*\d/8DZ
1094------------------------------------------------------------------
1095 Bra
1096 \x{100}*+
1097 \d
1098 Ket
1099 End
1100------------------------------------------------------------------
1101Capturing subpattern count = 0
1102Options: utf8
1103No first char
1104No need char
1105
1106/\x{100}*\s/8DZ
1107------------------------------------------------------------------
1108 Bra
1109 \x{100}*+
1110 \s
1111 Ket
1112 End
1113------------------------------------------------------------------
1114Capturing subpattern count = 0
1115Options: utf8
1116No first char
1117No need char
1118
1119/\x{100}*\w/8DZ
1120------------------------------------------------------------------
1121 Bra
1122 \x{100}*+
1123 \w
1124 Ket
1125 End
1126------------------------------------------------------------------
1127Capturing subpattern count = 0
1128Options: utf8
1129No first char
1130No need char
1131
1132/\x{100}*\D/8DZ
1133------------------------------------------------------------------
1134 Bra
1135 \x{100}*
1136 \D
1137 Ket
1138 End
1139------------------------------------------------------------------
1140Capturing subpattern count = 0
1141Options: utf8
1142No first char
1143No need char
1144
1145/\x{100}*\S/8DZ
1146------------------------------------------------------------------
1147 Bra
1148 \x{100}*
1149 \S
1150 Ket
1151 End
1152------------------------------------------------------------------
1153Capturing subpattern count = 0
1154Options: utf8
1155No first char
1156No need char
1157
1158/\x{100}*\W/8DZ
1159------------------------------------------------------------------
1160 Bra
1161 \x{100}*
1162 \W
1163 Ket
1164 End
1165------------------------------------------------------------------
1166Capturing subpattern count = 0
1167Options: utf8
1168No first char
1169No need char
1170
1171/\x{100}+\x{200}/8DZ
1172------------------------------------------------------------------
1173 Bra
1174 \x{100}++
1175 \x{200}
1176 Ket
1177 End
1178------------------------------------------------------------------
1179Capturing subpattern count = 0
1180Options: utf8
1181First char = 196
1182Need char = 128
1183
1184/\x{100}+X/8DZ
1185------------------------------------------------------------------
1186 Bra
1187 \x{100}++
1188 X
1189 Ket
1190 End
1191------------------------------------------------------------------
1192Capturing subpattern count = 0
1193Options: utf8
1194First char = 196
1195Need char = 'X'
1196
1197/X+\x{200}/8DZ
1198------------------------------------------------------------------
1199 Bra
1200 X++
1201 \x{200}
1202 Ket
1203 End
1204------------------------------------------------------------------
1205Capturing subpattern count = 0
1206Options: utf8
1207First char = 'X'
1208Need char = 128
1209
1210/()()()()()()()()()()
1211 ()()()()()()()()()()
1212 ()()()()()()()()()()
1213 ()()()()()()()()()()
1214 A (x) (?41) B/8x
1215 AxxB
1216Matched, but too many substrings
1217 0: AxxB
1218 1:
1219 2:
1220 3:
1221 4:
1222 5:
1223 6:
1224 7:
1225 8:
1226 9:
122710:
122811:
122912:
123013:
123114:
1232
1233/^[\x{100}\E-\Q\E\x{150}]/BZ8
1234------------------------------------------------------------------
1235 Bra
1236 ^
1237 [\x{100}-\x{150}]
1238 Ket
1239 End
1240------------------------------------------------------------------
1241
1242/^[\QĀ\E-\QŐ\E]/BZ8
1243------------------------------------------------------------------
1244 Bra
1245 ^
1246 [\x{100}-\x{150}]
1247 Ket
1248 End
1249------------------------------------------------------------------
1250
1251/^[\QĀ\E-\QŐ\E/BZ8
1252Failed: missing terminating ] for character class at offset 15
1253
1254/^abc./mgx8<any>
1255 abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
1256 0: abc1
1257 0: abc2
1258 0: abc3
1259 0: abc4
1260 0: abc5
1261 0: abc6
1262 0: abc7
1263 0: abc8
1264 0: abc9
1265
1266/abc.$/mgx8<any>
1267 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
1268 0: abc1
1269 0: abc2
1270 0: abc3
1271 0: abc4
1272 0: abc5
1273 0: abc6
1274 0: abc7
1275 0: abc8
1276 0: abc9
1277
1278/^a\Rb/8<bsr_unicode>
1279 a\nb
1280 0: a\x{0a}b
1281 a\rb
1282 0: a\x{0d}b
1283 a\r\nb
1284 0: a\x{0d}\x{0a}b
1285 a\x0bb
1286 0: a\x{0b}b
1287 a\x0cb
1288 0: a\x{0c}b
1289 a\x{85}b
1290 0: a\x{85}b
1291 a\x{2028}b
1292 0: a\x{2028}b
1293 a\x{2029}b
1294 0: a\x{2029}b
1295 ** Failers
1296No match
1297 a\n\rb
1298No match
1299
1300/^a\R*b/8<bsr_unicode>
1301 ab
1302 0: ab
1303 a\nb
1304 0: a\x{0a}b
1305 a\rb
1306 0: a\x{0d}b
1307 a\r\nb
1308 0: a\x{0d}\x{0a}b
1309 a\x0bb
1310 0: a\x{0b}b
1311 a\x0c\x{2028}\x{2029}b
1312 0: a\x{0c}\x{2028}\x{2029}b
1313 a\x{85}b
1314 0: a\x{85}b
1315 a\n\rb
1316 0: a\x{0a}\x{0d}b
1317 a\n\r\x{85}\x0cb
1318 0: a\x{0a}\x{0d}\x{85}\x{0c}b
1319
1320/^a\R+b/8<bsr_unicode>
1321 a\nb
1322 0: a\x{0a}b
1323 a\rb
1324 0: a\x{0d}b
1325 a\r\nb
1326 0: a\x{0d}\x{0a}b
1327 a\x0bb
1328 0: a\x{0b}b
1329 a\x0c\x{2028}\x{2029}b
1330 0: a\x{0c}\x{2028}\x{2029}b
1331 a\x{85}b
1332 0: a\x{85}b
1333 a\n\rb
1334 0: a\x{0a}\x{0d}b
1335 a\n\r\x{85}\x0cb
1336 0: a\x{0a}\x{0d}\x{85}\x{0c}b
1337 ** Failers
1338No match
1339 ab
1340No match
1341
1342/^a\R{1,3}b/8<bsr_unicode>
1343 a\nb
1344 0: a\x{0a}b
1345 a\n\rb
1346 0: a\x{0a}\x{0d}b
1347 a\n\r\x{85}b
1348 0: a\x{0a}\x{0d}\x{85}b
1349 a\r\n\r\nb
1350 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
1351 a\r\n\r\n\r\nb
1352 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
1353 a\n\r\n\rb
1354 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
1355 a\n\n\r\nb
1356 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
1357 ** Failers
1358No match
1359 a\n\n\n\rb
1360No match
1361 a\r
1362No match
1363
1364/\H\h\V\v/8
1365 X X\x0a
1366 0: X X\x{0a}
1367 X\x09X\x0b
1368 0: X\x{09}X\x{0b}
1369 ** Failers
1370No match
1371 \x{a0} X\x0a
1372No match
1373
1374/\H*\h+\V?\v{3,4}/8
1375 \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
1376 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
1377 \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
1378 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
1379 \x09\x20\x{a0}\x0a\x0b\x0c
1380 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
1381 ** Failers
1382No match
1383 \x09\x20\x{a0}\x0a\x0b
1384No match
1385
1386/\H\h\V\v/8
1387 \x{3001}\x{3000}\x{2030}\x{2028}
1388 0: \x{3001}\x{3000}\x{2030}\x{2028}
1389 X\x{180e}X\x{85}
1390 0: X\x{180e}X\x{85}
1391 ** Failers
1392No match
1393 \x{2009} X\x0a
1394No match
1395
1396/\H*\h+\V?\v{3,4}/8
1397 \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
1398 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
1399 \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
1400 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
1401 \x09\x20\x{202f}\x0a\x0b\x0c
1402 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
1403 ** Failers
1404No match
1405 \x09\x{200a}\x{a0}\x{2028}\x0b
1406No match
1407
1408/[\h]/8BZ
1409------------------------------------------------------------------
1410 Bra
1411 [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
1412 Ket
1413 End
1414------------------------------------------------------------------
1415 >\x{1680}
1416 0: \x{1680}
1417
1418/[\h]{3,}/8BZ
1419------------------------------------------------------------------
1420 Bra
1421 [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}
1422 Ket
1423 End
1424------------------------------------------------------------------
1425 >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
1426 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
1427
1428/[\v]/8BZ
1429------------------------------------------------------------------
1430 Bra
1431 [\x0a-\x0d\x85\x{2028}-\x{2029}]
1432 Ket
1433 End
1434------------------------------------------------------------------
1435
1436/[\H]/8BZ
1437------------------------------------------------------------------
1438 Bra
1439 [\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}]
1440 Ket
1441 End
1442------------------------------------------------------------------
1443
1444/[\V]/8BZ
1445------------------------------------------------------------------
1446 Bra
1447 [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{2029}-\x{7fffffff}]
1448 Ket
1449 End
1450------------------------------------------------------------------
1451
1452/.*$/8<any>
1453 \x{1ec5}
1454 0: \x{1ec5}
1455
1456/-- This tests the stricter UTF-8 check according to RFC 3629. --/
1457
1458/X/8
1459 \x{0}\x{d7ff}\x{e000}\x{10ffff}
1460No match
1461 \x{d800}
1462Error -10 (bad UTF-8 string) offset=0 reason=14
1463 \x{d800}\?
1464No match
1465 \x{da00}
1466Error -10 (bad UTF-8 string) offset=0 reason=14
1467 \x{da00}\?
1468No match
1469 \x{dfff}
1470Error -10 (bad UTF-8 string) offset=0 reason=14
1471 \x{dfff}\?
1472No match
1473 \x{110000}
1474Error -10 (bad UTF-8 string) offset=0 reason=13
1475 \x{110000}\?
1476No match
1477 \x{2000000}
1478Error -10 (bad UTF-8 string) offset=0 reason=11
1479 \x{2000000}\?
1480No match
1481 \x{7fffffff}
1482Error -10 (bad UTF-8 string) offset=0 reason=12
1483 \x{7fffffff}\?
1484No match
1485
1486/a\Rb/I8<bsr_anycrlf>
1487Capturing subpattern count = 0
1488Options: bsr_anycrlf utf8
1489First char = 'a'
1490Need char = 'b'
1491 a\rb
1492 0: a\x{0d}b
1493 a\nb
1494 0: a\x{0a}b
1495 a\r\nb
1496 0: a\x{0d}\x{0a}b
1497 ** Failers
1498No match
1499 a\x{85}b
1500No match
1501 a\x0bb
1502No match
1503
1504/a\Rb/I8<bsr_unicode>
1505Capturing subpattern count = 0
1506Options: bsr_unicode utf8
1507First char = 'a'
1508Need char = 'b'
1509 a\rb
1510 0: a\x{0d}b
1511 a\nb
1512 0: a\x{0a}b
1513 a\r\nb
1514 0: a\x{0d}\x{0a}b
1515 a\x{85}b
1516 0: a\x{85}b
1517 a\x0bb
1518 0: a\x{0b}b
1519 ** Failers
1520No match
1521 a\x{85}b\<bsr_anycrlf>
1522No match
1523 a\x0bb\<bsr_anycrlf>
1524No match
1525
1526/a\R?b/I8<bsr_anycrlf>
1527Capturing subpattern count = 0
1528Options: bsr_anycrlf utf8
1529First char = 'a'
1530Need char = 'b'
1531 a\rb
1532 0: a\x{0d}b
1533 a\nb
1534 0: a\x{0a}b
1535 a\r\nb
1536 0: a\x{0d}\x{0a}b
1537 ** Failers
1538No match
1539 a\x{85}b
1540No match
1541 a\x0bb
1542No match
1543
1544/a\R?b/I8<bsr_unicode>
1545Capturing subpattern count = 0
1546Options: bsr_unicode utf8
1547First char = 'a'
1548Need char = 'b'
1549 a\rb
1550 0: a\x{0d}b
1551 a\nb
1552 0: a\x{0a}b
1553 a\r\nb
1554 0: a\x{0d}\x{0a}b
1555 a\x{85}b
1556 0: a\x{85}b
1557 a\x0bb
1558 0: a\x{0b}b
1559 ** Failers
1560No match
1561 a\x{85}b\<bsr_anycrlf>
1562No match
1563 a\x0bb\<bsr_anycrlf>
1564No match
1565
1566/.*a.*=.b.*/8<ANY>
1567 QQQ\x{2029}ABCaXYZ=!bPQR
1568 0: ABCaXYZ=!bPQR
1569 ** Failers
1570No match
1571 a\x{2029}b
1572No match
1573 \x61\xe2\x80\xa9\x62
1574No match
1575
1576/[[:a\x{100}b:]]/8
1577Failed: unknown POSIX class name at offset 3
1578
1579/a[^]b/<JS>8
1580 a\x{1234}b
1581 0: a\x{1234}b
1582 a\nb
1583 0: a\x{0a}b
1584 ** Failers
1585No match
1586 ab
1587No match
1588
1589/a[^]+b/<JS>8
1590 aXb
1591 0: aXb
1592 a\nX\nX\x{1234}b
1593 0: a\x{0a}X\x{0a}X\x{1234}b
1594 ** Failers
1595No match
1596 ab
1597No match
1598
1599/(\x{de})\1/
1600 \x{de}\x{de}
1601 0: \xde\xde
1602 1: \xde
1603 \x{123}
1604** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
1605** Truncation will probably give the wrong result.
1606No match
1607
1608/X/8f<any>
1609 A\x{1ec5}ABCXYZ
1610 0: X
1611
1612/(*UTF8)\x{1234}/
1613 abcd\x{1234}pqr
1614 0: \x{1234}
1615
1616/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
1617Capturing subpattern count = 0
1618Options: bsr_unicode utf8
1619Forced newline sequence: CRLF
1620First char = 'a'
1621Need char = 'b'
1622
1623/Xa{2,4}b/8
1624 X\P
1625Partial match: X
1626 Xa\P
1627Partial match: Xa
1628 Xaa\P
1629Partial match: Xaa
1630 Xaaa\P
1631Partial match: Xaaa
1632 Xaaaa\P
1633Partial match: Xaaaa
1634
1635/Xa{2,4}?b/8
1636 X\P
1637Partial match: X
1638 Xa\P
1639Partial match: Xa
1640 Xaa\P
1641Partial match: Xaa
1642 Xaaa\P
1643Partial match: Xaaa
1644 Xaaaa\P
1645Partial match: Xaaaa
1646
1647/Xa{2,4}+b/8
1648 X\P
1649Partial match: X
1650 Xa\P
1651Partial match: Xa
1652 Xaa\P
1653Partial match: Xaa
1654 Xaaa\P
1655Partial match: Xaaa
1656 Xaaaa\P
1657Partial match: Xaaaa
1658
1659/X\x{123}{2,4}b/8
1660 X\P
1661Partial match: X
1662 X\x{123}\P
1663Partial match: X\x{123}
1664 X\x{123}\x{123}\P
1665Partial match: X\x{123}\x{123}
1666 X\x{123}\x{123}\x{123}\P
1667Partial match: X\x{123}\x{123}\x{123}
1668 X\x{123}\x{123}\x{123}\x{123}\P
1669Partial match: X\x{123}\x{123}\x{123}\x{123}
1670
1671/X\x{123}{2,4}?b/8
1672 X\P
1673Partial match: X
1674 X\x{123}\P
1675Partial match: X\x{123}
1676 X\x{123}\x{123}\P
1677Partial match: X\x{123}\x{123}
1678 X\x{123}\x{123}\x{123}\P
1679Partial match: X\x{123}\x{123}\x{123}
1680 X\x{123}\x{123}\x{123}\x{123}\P
1681Partial match: X\x{123}\x{123}\x{123}\x{123}
1682
1683/X\x{123}{2,4}+b/8
1684 X\P
1685Partial match: X
1686 X\x{123}\P
1687Partial match: X\x{123}
1688 X\x{123}\x{123}\P
1689Partial match: X\x{123}\x{123}
1690 X\x{123}\x{123}\x{123}\P
1691Partial match: X\x{123}\x{123}\x{123}
1692 X\x{123}\x{123}\x{123}\x{123}\P
1693Partial match: X\x{123}\x{123}\x{123}\x{123}
1694
1695/X\x{123}{2,4}b/8
1696 Xx\P
1697No match
1698 X\x{123}x\P
1699No match
1700 X\x{123}\x{123}x\P
1701No match
1702 X\x{123}\x{123}\x{123}x\P
1703No match
1704 X\x{123}\x{123}\x{123}\x{123}x\P
1705No match
1706
1707/X\x{123}{2,4}?b/8
1708 Xx\P
1709No match
1710 X\x{123}x\P
1711No match
1712 X\x{123}\x{123}x\P
1713No match
1714 X\x{123}\x{123}\x{123}x\P
1715No match
1716 X\x{123}\x{123}\x{123}\x{123}x\P
1717No match
1718
1719/X\x{123}{2,4}+b/8
1720 Xx\P
1721No match
1722 X\x{123}x\P
1723No match
1724 X\x{123}\x{123}x\P
1725No match
1726 X\x{123}\x{123}\x{123}x\P
1727No match
1728 X\x{123}\x{123}\x{123}\x{123}x\P
1729No match
1730
1731/X\d{2,4}b/8
1732 X\P
1733Partial match: X
1734 X3\P
1735Partial match: X3
1736 X33\P
1737Partial match: X33
1738 X333\P
1739Partial match: X333
1740 X3333\P
1741Partial match: X3333
1742
1743/X\d{2,4}?b/8
1744 X\P
1745Partial match: X
1746 X3\P
1747Partial match: X3
1748 X33\P
1749Partial match: X33
1750 X333\P
1751Partial match: X333
1752 X3333\P
1753Partial match: X3333
1754
1755/X\d{2,4}+b/8
1756 X\P
1757Partial match: X
1758 X3\P
1759Partial match: X3
1760 X33\P
1761Partial match: X33
1762 X333\P
1763Partial match: X333
1764 X3333\P
1765Partial match: X3333
1766
1767/X\D{2,4}b/8
1768 X\P
1769Partial match: X
1770 Xa\P
1771Partial match: Xa
1772 Xaa\P
1773Partial match: Xaa
1774 Xaaa\P
1775Partial match: Xaaa
1776 Xaaaa\P
1777Partial match: Xaaaa
1778
1779/X\D{2,4}?b/8
1780 X\P
1781Partial match: X
1782 Xa\P
1783Partial match: Xa
1784 Xaa\P
1785Partial match: Xaa
1786 Xaaa\P
1787Partial match: Xaaa
1788 Xaaaa\P
1789Partial match: Xaaaa
1790
1791/X\D{2,4}+b/8
1792 X\P
1793Partial match: X
1794 Xa\P
1795Partial match: Xa
1796 Xaa\P
1797Partial match: Xaa
1798 Xaaa\P
1799Partial match: Xaaa
1800 Xaaaa\P
1801Partial match: Xaaaa
1802
1803/X\D{2,4}b/8
1804 X\P
1805Partial match: X
1806 X\x{123}\P
1807Partial match: X\x{123}
1808 X\x{123}\x{123}\P
1809Partial match: X\x{123}\x{123}
1810 X\x{123}\x{123}\x{123}\P
1811Partial match: X\x{123}\x{123}\x{123}
1812 X\x{123}\x{123}\x{123}\x{123}\P
1813Partial match: X\x{123}\x{123}\x{123}\x{123}
1814
1815/X\D{2,4}?b/8
1816 X\P
1817Partial match: X
1818 X\x{123}\P
1819Partial match: X\x{123}
1820 X\x{123}\x{123}\P
1821Partial match: X\x{123}\x{123}
1822 X\x{123}\x{123}\x{123}\P
1823Partial match: X\x{123}\x{123}\x{123}
1824 X\x{123}\x{123}\x{123}\x{123}\P
1825Partial match: X\x{123}\x{123}\x{123}\x{123}
1826
1827/X\D{2,4}+b/8
1828 X\P
1829Partial match: X
1830 X\x{123}\P
1831Partial match: X\x{123}
1832 X\x{123}\x{123}\P
1833Partial match: X\x{123}\x{123}
1834 X\x{123}\x{123}\x{123}\P
1835Partial match: X\x{123}\x{123}\x{123}
1836 X\x{123}\x{123}\x{123}\x{123}\P
1837Partial match: X\x{123}\x{123}\x{123}\x{123}
1838
1839/X[abc]{2,4}b/8
1840 X\P
1841Partial match: X
1842 Xa\P
1843Partial match: Xa
1844 Xaa\P
1845Partial match: Xaa
1846 Xaaa\P
1847Partial match: Xaaa
1848 Xaaaa\P
1849Partial match: Xaaaa
1850
1851/X[abc]{2,4}?b/8
1852 X\P
1853Partial match: X
1854 Xa\P
1855Partial match: Xa
1856 Xaa\P
1857Partial match: Xaa
1858 Xaaa\P
1859Partial match: Xaaa
1860 Xaaaa\P
1861Partial match: Xaaaa
1862
1863/X[abc]{2,4}+b/8
1864 X\P
1865Partial match: X
1866 Xa\P
1867Partial match: Xa
1868 Xaa\P
1869Partial match: Xaa
1870 Xaaa\P
1871Partial match: Xaaa
1872 Xaaaa\P
1873Partial match: Xaaaa
1874
1875/X[abc\x{123}]{2,4}b/8
1876 X\P
1877Partial match: X
1878 X\x{123}\P
1879Partial match: X\x{123}
1880 X\x{123}\x{123}\P
1881Partial match: X\x{123}\x{123}
1882 X\x{123}\x{123}\x{123}\P
1883Partial match: X\x{123}\x{123}\x{123}
1884 X\x{123}\x{123}\x{123}\x{123}\P
1885Partial match: X\x{123}\x{123}\x{123}\x{123}
1886
1887/X[abc\x{123}]{2,4}?b/8
1888 X\P
1889Partial match: X
1890 X\x{123}\P
1891Partial match: X\x{123}
1892 X\x{123}\x{123}\P
1893Partial match: X\x{123}\x{123}
1894 X\x{123}\x{123}\x{123}\P
1895Partial match: X\x{123}\x{123}\x{123}
1896 X\x{123}\x{123}\x{123}\x{123}\P
1897Partial match: X\x{123}\x{123}\x{123}\x{123}
1898
1899/X[abc\x{123}]{2,4}+b/8
1900 X\P
1901Partial match: X
1902 X\x{123}\P
1903Partial match: X\x{123}
1904 X\x{123}\x{123}\P
1905Partial match: X\x{123}\x{123}
1906 X\x{123}\x{123}\x{123}\P
1907Partial match: X\x{123}\x{123}\x{123}
1908 X\x{123}\x{123}\x{123}\x{123}\P
1909Partial match: X\x{123}\x{123}\x{123}\x{123}
1910
1911/X[^a]{2,4}b/8
1912 X\P
1913Partial match: X
1914 Xz\P
1915Partial match: Xz
1916 Xzz\P
1917Partial match: Xzz
1918 Xzzz\P
1919Partial match: Xzzz
1920 Xzzzz\P
1921Partial match: Xzzzz
1922
1923/X[^a]{2,4}?b/8
1924 X\P
1925Partial match: X
1926 Xz\P
1927Partial match: Xz
1928 Xzz\P
1929Partial match: Xzz
1930 Xzzz\P
1931Partial match: Xzzz
1932 Xzzzz\P
1933Partial match: Xzzzz
1934
1935/X[^a]{2,4}+b/8
1936 X\P
1937Partial match: X
1938 Xz\P
1939Partial match: Xz
1940 Xzz\P
1941Partial match: Xzz
1942 Xzzz\P
1943Partial match: Xzzz
1944 Xzzzz\P
1945Partial match: Xzzzz
1946
1947/X[^a]{2,4}b/8
1948 X\P
1949Partial match: X
1950 X\x{123}\P
1951Partial match: X\x{123}
1952 X\x{123}\x{123}\P
1953Partial match: X\x{123}\x{123}
1954 X\x{123}\x{123}\x{123}\P
1955Partial match: X\x{123}\x{123}\x{123}
1956 X\x{123}\x{123}\x{123}\x{123}\P
1957Partial match: X\x{123}\x{123}\x{123}\x{123}
1958
1959/X[^a]{2,4}?b/8
1960 X\P
1961Partial match: X
1962 X\x{123}\P
1963Partial match: X\x{123}
1964 X\x{123}\x{123}\P
1965Partial match: X\x{123}\x{123}
1966 X\x{123}\x{123}\x{123}\P
1967Partial match: X\x{123}\x{123}\x{123}
1968 X\x{123}\x{123}\x{123}\x{123}\P
1969Partial match: X\x{123}\x{123}\x{123}\x{123}
1970
1971/X[^a]{2,4}+b/8
1972 X\P
1973Partial match: X
1974 X\x{123}\P
1975Partial match: X\x{123}
1976 X\x{123}\x{123}\P
1977Partial match: X\x{123}\x{123}
1978 X\x{123}\x{123}\x{123}\P
1979Partial match: X\x{123}\x{123}\x{123}
1980 X\x{123}\x{123}\x{123}\x{123}\P
1981Partial match: X\x{123}\x{123}\x{123}\x{123}
1982
1983/(Y)X\1{2,4}b/8
1984 YX\P
1985Partial match: YX
1986 YXY\P
1987Partial match: YXY
1988 YXYY\P
1989Partial match: YXYY
1990 YXYYY\P
1991Partial match: YXYYY
1992 YXYYYY\P
1993Partial match: YXYYYY
1994
1995/(Y)X\1{2,4}?b/8
1996 YX\P
1997Partial match: YX
1998 YXY\P
1999Partial match: YXY
2000 YXYY\P
2001Partial match: YXYY
2002 YXYYY\P
2003Partial match: YXYYY
2004 YXYYYY\P
2005Partial match: YXYYYY
2006
2007/(Y)X\1{2,4}+b/8
2008 YX\P
2009Partial match: YX
2010 YXY\P
2011Partial match: YXY
2012 YXYY\P
2013Partial match: YXYY
2014 YXYYY\P
2015Partial match: YXYYY
2016 YXYYYY\P
2017Partial match: YXYYYY
2018
2019/(\x{123})X\1{2,4}b/8
2020 \x{123}X\P
2021Partial match: \x{123}X
2022 \x{123}X\x{123}\P
2023Partial match: \x{123}X\x{123}
2024 \x{123}X\x{123}\x{123}\P
2025Partial match: \x{123}X\x{123}\x{123}
2026 \x{123}X\x{123}\x{123}\x{123}\P
2027Partial match: \x{123}X\x{123}\x{123}\x{123}
2028 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2029Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2030
2031/(\x{123})X\1{2,4}?b/8
2032 \x{123}X\P
2033Partial match: \x{123}X
2034 \x{123}X\x{123}\P
2035Partial match: \x{123}X\x{123}
2036 \x{123}X\x{123}\x{123}\P
2037Partial match: \x{123}X\x{123}\x{123}
2038 \x{123}X\x{123}\x{123}\x{123}\P
2039Partial match: \x{123}X\x{123}\x{123}\x{123}
2040 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2041Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2042
2043/(\x{123})X\1{2,4}+b/8
2044 \x{123}X\P
2045Partial match: \x{123}X
2046 \x{123}X\x{123}\P
2047Partial match: \x{123}X\x{123}
2048 \x{123}X\x{123}\x{123}\P
2049Partial match: \x{123}X\x{123}\x{123}
2050 \x{123}X\x{123}\x{123}\x{123}\P
2051Partial match: \x{123}X\x{123}\x{123}\x{123}
2052 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
2053Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
2054
2055/\bthe cat\b/8
2056 the cat\P
2057 0: the cat
2058 the cat\P\P
2059Partial match: the cat
2060
2061/abcd*/8
2062 xxxxabcd\P
2063 0: abcd
2064 xxxxabcd\P\P
2065Partial match: abcd
2066
2067/abcd*/i8
2068 xxxxabcd\P
2069 0: abcd
2070 xxxxabcd\P\P
2071Partial match: abcd
2072 XXXXABCD\P
2073 0: ABCD
2074 XXXXABCD\P\P
2075Partial match: ABCD
2076
2077/abc\d*/8
2078 xxxxabc1\P
2079 0: abc1
2080 xxxxabc1\P\P
2081Partial match: abc1
2082
2083/(a)bc\1*/8
2084 xxxxabca\P
2085 0: abca
2086 1: a
2087 xxxxabca\P\P
2088Partial match: abca
2089
2090/abc[de]*/8
2091 xxxxabcde\P
2092 0: abcde
2093 xxxxabcde\P\P
2094Partial match: abcde
2095
2096/X\W{3}X/8
2097 \PX
2098Partial match: X
2099
2100/\h/SI
2101Capturing subpattern count = 0
2102No options
2103No first char
2104No need char
2105Subject length lower bound = 1
2106Starting byte set: \x09 \x20 \xa0
2107
2108/\h/SI8
2109Capturing subpattern count = 0
2110Options: utf8
2111No first char
2112No need char
2113Subject length lower bound = 1
2114Starting byte set: \x09 \x20 \xc2 \xe1 \xe2 \xe3
2115 ABC\x{09}
2116 0: \x{09}
2117 ABC\x{20}
2118 0:
2119 ABC\x{a0}
2120 0: \x{a0}
2121 ABC\x{1680}
2122 0: \x{1680}
2123 ABC\x{180e}
2124 0: \x{180e}
2125 ABC\x{2000}
2126 0: \x{2000}
2127 ABC\x{202f}
2128 0: \x{202f}
2129 ABC\x{205f}
2130 0: \x{205f}
2131 ABC\x{3000}
2132 0: \x{3000}
2133
2134/\v/SI
2135Capturing subpattern count = 0
2136No options
2137No first char
2138No need char
2139Subject length lower bound = 1
2140Starting byte set: \x0a \x0b \x0c \x0d \x85
2141
2142/\v/SI8
2143Capturing subpattern count = 0
2144Options: utf8
2145No first char
2146No need char
2147Subject length lower bound = 1
2148Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2149 ABC\x{0a}
2150 0: \x{0a}
2151 ABC\x{0b}
2152 0: \x{0b}
2153 ABC\x{0c}
2154 0: \x{0c}
2155 ABC\x{0d}
2156 0: \x{0d}
2157 ABC\x{85}
2158 0: \x{85}
2159 ABC\x{2028}
2160 0: \x{2028}
2161
2162/\R/SI
2163Capturing subpattern count = 0
2164No options
2165No first char
2166No need char
2167Subject length lower bound = 1
2168Starting byte set: \x0a \x0b \x0c \x0d \x85
2169
2170/\R/SI8
2171Capturing subpattern count = 0
2172Options: utf8
2173No first char
2174No need char
2175Subject length lower bound = 1
2176Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2177
2178/\h*A/SI8
2179Capturing subpattern count = 0
2180Options: utf8
2181No first char
2182Need char = 'A'
2183Subject length lower bound = 1
2184Starting byte set: \x09 \x20 A \xc2 \xe1 \xe2 \xe3
2185 CDBABC
2186 0: A
2187
2188/\v+A/SI8
2189Capturing subpattern count = 0
2190Options: utf8
2191No first char
2192Need char = 'A'
2193Subject length lower bound = 2
2194Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
2195
2196/\s?xxx\s/8SI
2197Capturing subpattern count = 0
2198Options: utf8
2199No first char
2200Need char = 'x'
2201Subject length lower bound = 4
2202Starting byte set: \x09 \x0a \x0c \x0d \x20 x
2203
2204/\sxxx\s/8T1
2205 AB\x{85}xxx\x{a0}XYZ
2206 0: \x{85}xxx\x{a0}
2207 AB\x{a0}xxx\x{85}XYZ
2208 0: \x{a0}xxx\x{85}
2209
2210/\sxxx\s/I8ST1
2211Capturing subpattern count = 0
2212Options: utf8
2213No first char
2214Need char = 'x'
2215Subject length lower bound = 5
2216Starting byte set: \x09 \x0a \x0c \x0d \x20 \xc2
2217 AB\x{85}xxx\x{a0}XYZ
2218 0: \x{85}xxx\x{a0}
2219 AB\x{a0}xxx\x{85}XYZ
2220 0: \x{a0}xxx\x{85}
2221
2222/\S \S/8T1
2223 \x{a2} \x{84}
2224 0: \x{a2} \x{84}
2225
2226/\S \S/I8ST1
2227Capturing subpattern count = 0
2228Options: utf8
2229No first char
2230Need char = ' '
2231Subject length lower bound = 3
2232Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0b \x0e
2233 \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d
2234 \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
2235 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
2236 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
2237 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2
2238 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1
2239 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0
2240 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff
2241 \x{a2} \x{84}
2242 0: \x{a2} \x{84}
2243 A Z
2244 0: A Z
2245
2246'A#хц'8x<any>BZ
2247------------------------------------------------------------------
2248 Bra
2249 A
2250 Ket
2251 End
2252------------------------------------------------------------------
2253
2254'A#хц
2255 PQ'8x<any>BZ
2256------------------------------------------------------------------
2257 Bra
2258 APQ
2259 Ket
2260 End
2261------------------------------------------------------------------
2262
2263/a+#хaa
2264 z#XX?/8x<any>BZ
2265------------------------------------------------------------------
2266 Bra
2267 a++
2268 z
2269 Ket
2270 End
2271------------------------------------------------------------------
2272
2273/a+#хaa
2274 z#х?/8x<any>BZ
2275------------------------------------------------------------------
2276 Bra
2277 a++
2278 z
2279 Ket
2280 End
2281------------------------------------------------------------------
2282
2283/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
2284------------------------------------------------------------------
2285 Bra
2286 \1
2287 xxx
2288 CBra 1
2289 456
2290 Ket
2291 Ket
2292 End
2293------------------------------------------------------------------
2294
2295/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
2296------------------------------------------------------------------
2297 Bra
2298 \1
2299 xxx
2300 CBra 1
2301 456
2302 Ket
2303 Ket
2304 End
2305------------------------------------------------------------------
2306
2307/a+/8
2308 a\x{123}aa\>1
2309 0: aa
2310 a\x{123}aa\>2
2311Error -11 (bad UTF-8 offset)
2312 a\x{123}aa\>3
2313 0: aa
2314 a\x{123}aa\>4
2315 0: a
2316 a\x{123}aa\>5
2317No match
2318 a\x{123}aa\>6
2319Error -24 (bad offset value)
2320
2321/^\cģ/8
2322Failed: \c must be followed by an ASCII character at offset 3
2323
2324/(\R*)(.)/s8
2325 \r\n
2326 0: \x{0d}
2327 1:
2328 2: \x{0d}
2329 \r\r\n\n\r
2330 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
2331 1: \x{0d}\x{0d}\x{0a}\x{0a}
2332 2: \x{0d}
2333 \r\r\n\n\r\n
2334 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
2335 1: \x{0d}\x{0d}\x{0a}\x{0a}
2336 2: \x{0d}
2337
2338/(\R)*(.)/s8
2339 \r\n
2340 0: \x{0d}
2341 1: <unset>
2342 2: \x{0d}
2343 \r\r\n\n\r
2344 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
2345 1: \x{0a}
2346 2: \x{0d}
2347 \r\r\n\n\r\n
2348 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
2349 1: \x{0a}
2350 2: \x{0d}
2351
2352/\x{1234}+/iS8I
2353Capturing subpattern count = 0
2354Options: caseless utf8
2355No first char
2356No need char
2357Subject length lower bound = 1
2358Starting byte set: \xe1
2359
2360/\x{1234}+?/iS8I
2361Capturing subpattern count = 0
2362Options: caseless utf8
2363No first char
2364No need char
2365Subject length lower bound = 1
2366Starting byte set: \xe1
2367
2368/\x{1234}++/iS8I
2369Capturing subpattern count = 0
2370Options: caseless utf8
2371No first char
2372No need char
2373Subject length lower bound = 1
2374Starting byte set: \xe1
2375
2376/\x{1234}{2}/iS8I
2377Capturing subpattern count = 0
2378Options: caseless utf8
2379No first char
2380No need char
2381Subject length lower bound = 2
2382Starting byte set: \xe1
2383
2384/[^\x{1234}]+/iS8I
2385Capturing subpattern count = 0
2386Options: caseless utf8
2387No first char
2388No need char
2389Subject length lower bound = 1
2390No set of starting bytes
2391
2392/[^\x{1234}]+?/iS8I
2393Capturing subpattern count = 0
2394Options: caseless utf8
2395No first char
2396No need char
2397Subject length lower bound = 1
2398No set of starting bytes
2399
2400/[^\x{1234}]++/iS8I
2401Capturing subpattern count = 0
2402Options: caseless utf8
2403No first char
2404No need char
2405Subject length lower bound = 1
2406No set of starting bytes
2407
2408/[^\x{1234}]{2}/iS8I
2409Capturing subpattern count = 0
2410Options: caseless utf8
2411No first char
2412No need char
2413Subject length lower bound = 2
2414No set of starting bytes
2415
2416//<bsr_anycrlf><bsr_unicode>
2417Failed: inconsistent NEWLINE options at offset 0
2418
2419/f.*/
2420 \P\Pfor
2421Partial match: for
2422
2423/f.*/s
2424 \P\Pfor
2425Partial match: for
2426
2427/f.*/8
2428 \P\Pfor
2429Partial match: for
2430
2431/f.*/8s
2432 \P\Pfor
2433Partial match: for
2434
2435/-- End of testinput5 --/