xref: /PHP-5.3/ext/pcre/pcrelib/testdata/testinput9 (revision 276c5de0)
1/-- This set of tests checks UTF-8 support with the DFA matching functionality
2    of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
3    it. --/
4
5/\x{100}ab/8
6  \x{100}ab
7
8/a\x{100}*b/8
9    ab
10    a\x{100}b
11    a\x{100}\x{100}b
12
13/a\x{100}+b/8
14    a\x{100}b
15    a\x{100}\x{100}b
16    *** Failers
17    ab
18
19/\bX/8
20    Xoanon
21    +Xoanon
22    \x{300}Xoanon
23    *** Failers
24    YXoanon
25
26/\BX/8
27    YXoanon
28    *** Failers
29    Xoanon
30    +Xoanon
31    \x{300}Xoanon
32
33/X\b/8
34    X+oanon
35    ZX\x{300}oanon
36    FAX
37    *** Failers
38    Xoanon
39
40/X\B/8
41    Xoanon
42    *** Failers
43    X+oanon
44    ZX\x{300}oanon
45    FAX
46
47/[^a]/8
48    abcd
49    a\x{100}
50
51/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
52    ab99
53    \x{123}\x{123}45
54    \x{400}\x{401}\x{402}6
55    *** Failers
56    d99
57    \x{123}\x{122}4
58    \x{400}\x{403}6
59    \x{400}\x{401}\x{402}\x{402}6
60
61/a.b/8
62    acb
63    a\x7fb
64    a\x{100}b
65    *** Failers
66    a\nb
67
68/a(.{3})b/8
69    a\x{4000}xyb
70    a\x{4000}\x7fyb
71    a\x{4000}\x{100}yb
72    *** Failers
73    a\x{4000}b
74    ac\ncb
75
76/a(.*?)(.)/
77    a\xc0\x88b
78
79/a(.*?)(.)/8
80    a\x{100}b
81
82/a(.*)(.)/
83    a\xc0\x88b
84
85/a(.*)(.)/8
86    a\x{100}b
87
88/a(.)(.)/
89    a\xc0\x92bcd
90
91/a(.)(.)/8
92    a\x{240}bcd
93
94/a(.?)(.)/
95    a\xc0\x92bcd
96
97/a(.?)(.)/8
98    a\x{240}bcd
99
100/a(.??)(.)/
101    a\xc0\x92bcd
102
103/a(.??)(.)/8
104    a\x{240}bcd
105
106/a(.{3})b/8
107    a\x{1234}xyb
108    a\x{1234}\x{4321}yb
109    a\x{1234}\x{4321}\x{3412}b
110    *** Failers
111    a\x{1234}b
112    ac\ncb
113
114/a(.{3,})b/8
115    a\x{1234}xyb
116    a\x{1234}\x{4321}yb
117    a\x{1234}\x{4321}\x{3412}b
118    axxxxbcdefghijb
119    a\x{1234}\x{4321}\x{3412}\x{3421}b
120    *** Failers
121    a\x{1234}b
122
123/a(.{3,}?)b/8
124    a\x{1234}xyb
125    a\x{1234}\x{4321}yb
126    a\x{1234}\x{4321}\x{3412}b
127    axxxxbcdefghijb
128    a\x{1234}\x{4321}\x{3412}\x{3421}b
129    *** Failers
130    a\x{1234}b
131
132/a(.{3,5})b/8
133    a\x{1234}xyb
134    a\x{1234}\x{4321}yb
135    a\x{1234}\x{4321}\x{3412}b
136    axxxxbcdefghijb
137    a\x{1234}\x{4321}\x{3412}\x{3421}b
138    axbxxbcdefghijb
139    axxxxxbcdefghijb
140    *** Failers
141    a\x{1234}b
142    axxxxxxbcdefghijb
143
144/a(.{3,5}?)b/8
145    a\x{1234}xyb
146    a\x{1234}\x{4321}yb
147    a\x{1234}\x{4321}\x{3412}b
148    axxxxbcdefghijb
149    a\x{1234}\x{4321}\x{3412}\x{3421}b
150    axbxxbcdefghijb
151    axxxxxbcdefghijb
152    *** Failers
153    a\x{1234}b
154    axxxxxxbcdefghijb
155
156/^[a\x{c0}]/8
157    *** Failers
158    \x{100}
159
160/(?<=aXb)cd/8
161    aXbcd
162
163/(?<=a\x{100}b)cd/8
164    a\x{100}bcd
165
166/(?<=a\x{100000}b)cd/8
167    a\x{100000}bcd
168
169/(?:\x{100}){3}b/8
170    \x{100}\x{100}\x{100}b
171    *** Failers
172    \x{100}\x{100}b
173
174/\x{ab}/8
175    \x{ab}
176    \xc2\xab
177    *** Failers
178    \x00{ab}
179
180/(?<=(.))X/8
181    WXYZ
182    \x{256}XYZ
183    *** Failers
184    XYZ
185
186/[^a]+/8g
187    bcd
188    \x{100}aY\x{256}Z
189
190/^[^a]{2}/8
191    \x{100}bc
192
193/^[^a]{2,}/8
194    \x{100}bcAa
195
196/^[^a]{2,}?/8
197    \x{100}bca
198
199/[^a]+/8ig
200    bcd
201    \x{100}aY\x{256}Z
202
203/^[^a]{2}/8i
204    \x{100}bc
205
206/^[^a]{2,}/8i
207    \x{100}bcAa
208
209/^[^a]{2,}?/8i
210    \x{100}bca
211
212/\x{100}{0,0}/8
213    abcd
214
215/\x{100}?/8
216    abcd
217    \x{100}\x{100}
218
219/\x{100}{0,3}/8
220    \x{100}\x{100}
221    \x{100}\x{100}\x{100}\x{100}
222
223/\x{100}*/8
224    abce
225    \x{100}\x{100}\x{100}\x{100}
226
227/\x{100}{1,1}/8
228    abcd\x{100}\x{100}\x{100}\x{100}
229
230/\x{100}{1,3}/8
231    abcd\x{100}\x{100}\x{100}\x{100}
232
233/\x{100}+/8
234    abcd\x{100}\x{100}\x{100}\x{100}
235
236/\x{100}{3}/8
237    abcd\x{100}\x{100}\x{100}XX
238
239/\x{100}{3,5}/8
240    abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
241
242/\x{100}{3,}/8
243    abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
244
245/(?<=a\x{100}{2}b)X/8
246    Xyyya\x{100}\x{100}bXzzz
247
248/\D*/8
249  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
250
251/\D*/8
252  \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
253
254/\D/8
255    1X2
256    1\x{100}2
257
258/>\S/8
259    > >X Y
260    > >\x{100} Y
261
262/\d/8
263    \x{100}3
264
265/\s/8
266    \x{100} X
267
268/\D+/8
269    12abcd34
270    *** Failers
271    1234
272
273/\D{2,3}/8
274    12abcd34
275    12ab34
276    *** Failers
277    1234
278    12a34
279
280/\D{2,3}?/8
281    12abcd34
282    12ab34
283    *** Failers
284    1234
285    12a34
286
287/\d+/8
288    12abcd34
289    *** Failers
290
291/\d{2,3}/8
292    12abcd34
293    1234abcd
294    *** Failers
295    1.4
296
297/\d{2,3}?/8
298    12abcd34
299    1234abcd
300    *** Failers
301    1.4
302
303/\S+/8
304    12abcd34
305    *** Failers
306    \    \
307
308/\S{2,3}/8
309    12abcd34
310    1234abcd
311    *** Failers
312    \     \
313
314/\S{2,3}?/8
315    12abcd34
316    1234abcd
317    *** Failers
318    \     \
319
320/>\s+</8
321    12>      <34
322    *** Failers
323
324/>\s{2,3}</8
325    ab>  <cd
326    ab>   <ce
327    *** Failers
328    ab>    <cd
329
330/>\s{2,3}?</8
331    ab>  <cd
332    ab>   <ce
333    *** Failers
334    ab>    <cd
335
336/\w+/8
337    12      34
338    *** Failers
339    +++=*!
340
341/\w{2,3}/8
342    ab  cd
343    abcd ce
344    *** Failers
345    a.b.c
346
347/\w{2,3}?/8
348    ab  cd
349    abcd ce
350    *** Failers
351    a.b.c
352
353/\W+/8
354    12====34
355    *** Failers
356    abcd
357
358/\W{2,3}/8
359    ab====cd
360    ab==cd
361    *** Failers
362    a.b.c
363
364/\W{2,3}?/8
365    ab====cd
366    ab==cd
367    *** Failers
368    a.b.c
369
370/[\x{100}]/8
371    \x{100}
372    Z\x{100}
373    \x{100}Z
374    *** Failers
375
376/[Z\x{100}]/8
377    Z\x{100}
378    \x{100}
379    \x{100}Z
380    *** Failers
381
382/[\x{100}\x{200}]/8
383   ab\x{100}cd
384   ab\x{200}cd
385   *** Failers
386
387/[\x{100}-\x{200}]/8
388   ab\x{100}cd
389   ab\x{200}cd
390   ab\x{111}cd
391   *** Failers
392
393/[z-\x{200}]/8
394   ab\x{100}cd
395   ab\x{200}cd
396   ab\x{111}cd
397   abzcd
398   ab|cd
399   *** Failers
400
401/[Q\x{100}\x{200}]/8
402   ab\x{100}cd
403   ab\x{200}cd
404   Q?
405   *** Failers
406
407/[Q\x{100}-\x{200}]/8
408   ab\x{100}cd
409   ab\x{200}cd
410   ab\x{111}cd
411   Q?
412   *** Failers
413
414/[Qz-\x{200}]/8
415   ab\x{100}cd
416   ab\x{200}cd
417   ab\x{111}cd
418   abzcd
419   ab|cd
420   Q?
421   *** Failers
422
423/[\x{100}\x{200}]{1,3}/8
424   ab\x{100}cd
425   ab\x{200}cd
426   ab\x{200}\x{100}\x{200}\x{100}cd
427   *** Failers
428
429/[\x{100}\x{200}]{1,3}?/8
430   ab\x{100}cd
431   ab\x{200}cd
432   ab\x{200}\x{100}\x{200}\x{100}cd
433   *** Failers
434
435/[Q\x{100}\x{200}]{1,3}/8
436   ab\x{100}cd
437   ab\x{200}cd
438   ab\x{200}\x{100}\x{200}\x{100}cd
439   *** Failers
440
441/[Q\x{100}\x{200}]{1,3}?/8
442   ab\x{100}cd
443   ab\x{200}cd
444   ab\x{200}\x{100}\x{200}\x{100}cd
445   *** Failers
446
447/(?<=[\x{100}\x{200}])X/8
448    abc\x{200}X
449    abc\x{100}X
450    *** Failers
451    X
452
453/(?<=[Q\x{100}\x{200}])X/8
454    abc\x{200}X
455    abc\x{100}X
456    abQX
457    *** Failers
458    X
459
460/(?<=[\x{100}\x{200}]{3})X/8
461    abc\x{100}\x{200}\x{100}X
462    *** Failers
463    abc\x{200}X
464    X
465
466/[^\x{100}\x{200}]X/8
467    AX
468    \x{150}X
469    \x{500}X
470    *** Failers
471    \x{100}X
472    \x{200}X
473
474/[^Q\x{100}\x{200}]X/8
475    AX
476    \x{150}X
477    \x{500}X
478    *** Failers
479    \x{100}X
480    \x{200}X
481    QX
482
483/[^\x{100}-\x{200}]X/8
484    AX
485    \x{500}X
486    *** Failers
487    \x{100}X
488    \x{150}X
489    \x{200}X
490
491/[z-\x{100}]/8i
492    z
493    Z
494    \x{100}
495    *** Failers
496    \x{102}
497    y
498
499/[\xFF]/
500    >\xff<
501
502/[\xff]/8
503    >\x{ff}<
504
505/[^\xFF]/
506    XYZ
507
508/[^\xff]/8
509    XYZ
510    \x{123}
511
512/^[ac]*b/8
513  xb
514
515/^[ac\x{100}]*b/8
516  xb
517
518/^[^x]*b/8i
519  xb
520
521/^[^x]*b/8
522  xb
523
524/^\d*b/8
525  xb
526
527/(|a)/g8
528    catac
529    a\x{256}a
530
531/^\x{85}$/8i
532    \x{85}
533
534/^abc./mgx8<any>
535    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
536
537/abc.$/mgx8<any>
538    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
539
540/^a\Rb/8<bsr_unicode>
541    a\nb
542    a\rb
543    a\r\nb
544    a\x0bb
545    a\x0cb
546    a\x{85}b
547    a\x{2028}b
548    a\x{2029}b
549    ** Failers
550    a\n\rb
551
552/^a\R*b/8<bsr_unicode>
553    ab
554    a\nb
555    a\rb
556    a\r\nb
557    a\x0bb
558    a\x0c\x{2028}\x{2029}b
559    a\x{85}b
560    a\n\rb
561    a\n\r\x{85}\x0cb
562
563/^a\R+b/8<bsr_unicode>
564    a\nb
565    a\rb
566    a\r\nb
567    a\x0bb
568    a\x0c\x{2028}\x{2029}b
569    a\x{85}b
570    a\n\rb
571    a\n\r\x{85}\x0cb
572    ** Failers
573    ab
574
575/^a\R{1,3}b/8<bsr_unicode>
576    a\nb
577    a\n\rb
578    a\n\r\x{85}b
579    a\r\n\r\nb
580    a\r\n\r\n\r\nb
581    a\n\r\n\rb
582    a\n\n\r\nb
583    ** Failers
584    a\n\n\n\rb
585    a\r
586
587/\h+\V?\v{3,4}/8
588    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
589
590/\V?\v{3,4}/8
591    \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
592
593/\h+\V?\v{3,4}/8
594    >\x09\x20\x{a0}X\x0a\x0a\x0a<
595
596/\V?\v{3,4}/8
597    >\x09\x20\x{a0}X\x0a\x0a\x0a<
598
599/\H\h\V\v/8
600    X X\x0a
601    X\x09X\x0b
602    ** Failers
603    \x{a0} X\x0a
604
605/\H*\h+\V?\v{3,4}/8
606    \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
607    \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
608    \x09\x20\x{a0}\x0a\x0b\x0c
609    ** Failers
610    \x09\x20\x{a0}\x0a\x0b
611
612/\H\h\V\v/8
613    \x{3001}\x{3000}\x{2030}\x{2028}
614    X\x{180e}X\x{85}
615    ** Failers
616    \x{2009} X\x0a
617
618/\H*\h+\V?\v{3,4}/8
619    \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
620    \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
621    \x09\x20\x{202f}\x0a\x0b\x0c
622    ** Failers
623    \x09\x{200a}\x{a0}\x{2028}\x0b
624
625/a\Rb/I8<bsr_anycrlf>
626    a\rb
627    a\nb
628    a\r\nb
629    ** Failers
630    a\x{85}b
631    a\x0bb
632
633/a\Rb/I8<bsr_unicode>
634    a\rb
635    a\nb
636    a\r\nb
637    a\x{85}b
638    a\x0bb
639    ** Failers
640    a\x{85}b\<bsr_anycrlf>
641    a\x0bb\<bsr_anycrlf>
642
643/a\R?b/I8<bsr_anycrlf>
644    a\rb
645    a\nb
646    a\r\nb
647    ** Failers
648    a\x{85}b
649    a\x0bb
650
651/a\R?b/I8<bsr_unicode>
652    a\rb
653    a\nb
654    a\r\nb
655    a\x{85}b
656    a\x0bb
657    ** Failers
658    a\x{85}b\<bsr_anycrlf>
659    a\x0bb\<bsr_anycrlf>
660
661/X/8f<any>
662    A\x{1ec5}ABCXYZ
663
664/abcd*/8
665    xxxxabcd\P
666    xxxxabcd\P\P
667
668/abcd*/i8
669    xxxxabcd\P
670    xxxxabcd\P\P
671    XXXXABCD\P
672    XXXXABCD\P\P
673
674/abc\d*/8
675    xxxxabc1\P
676    xxxxabc1\P\P
677
678/abc[de]*/8
679    xxxxabcde\P
680    xxxxabcde\P\P
681
682/\bthe cat\b/8
683    the cat\P
684    the cat\P\P
685
686/ab\Cde/8
687    abXde
688
689/(?<=ab\Cde)X/8
690
691/./8<CRLF>
692    \r\P
693    \r\P\P
694
695/.{2,3}/8<CRLF>
696    \r\P
697    \r\P\P
698    \r\r\P
699    \r\r\P\P
700    \r\r\r\P
701    \r\r\r\P\P
702
703/.{2,3}?/8<CRLF>
704    \r\P
705    \r\P\P
706    \r\r\P
707    \r\r\P\P
708    \r\r\r\P
709    \r\r\r\P\P
710
711/[^\x{100}]/8
712    \x{100}\x{101}X
713
714/[^\x{100}]+/8
715    \x{100}\x{101}X
716
717/-- End of testinput9 --/
718