~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/pcre/testdata/testoutput1

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
PCRE version 5.0 13-Sep-2004
 
2
 
 
3
/the quick brown fox/
 
4
    the quick brown fox
 
5
 0: the quick brown fox
 
6
    The quick brown FOX
 
7
No match
 
8
    What do you know about the quick brown fox?
 
9
 0: the quick brown fox
 
10
    What do you know about THE QUICK BROWN FOX?
 
11
No match
 
12
 
 
13
/The quick brown fox/i
 
14
    the quick brown fox
 
15
 0: the quick brown fox
 
16
    The quick brown FOX
 
17
 0: The quick brown FOX
 
18
    What do you know about the quick brown fox?
 
19
 0: the quick brown fox
 
20
    What do you know about THE QUICK BROWN FOX?
 
21
 0: THE QUICK BROWN FOX
 
22
 
 
23
/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
 
24
    abcd\t\n\r\f\a\e9;\$\\?caxyz
 
25
 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
 
26
 
 
27
/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
 
28
    abxyzpqrrrabbxyyyypqAzz
 
29
 0: abxyzpqrrrabbxyyyypqAzz
 
30
    abxyzpqrrrabbxyyyypqAzz
 
31
 0: abxyzpqrrrabbxyyyypqAzz
 
32
    aabxyzpqrrrabbxyyyypqAzz
 
33
 0: aabxyzpqrrrabbxyyyypqAzz
 
34
    aaabxyzpqrrrabbxyyyypqAzz
 
35
 0: aaabxyzpqrrrabbxyyyypqAzz
 
36
    aaaabxyzpqrrrabbxyyyypqAzz
 
37
 0: aaaabxyzpqrrrabbxyyyypqAzz
 
38
    abcxyzpqrrrabbxyyyypqAzz
 
39
 0: abcxyzpqrrrabbxyyyypqAzz
 
40
    aabcxyzpqrrrabbxyyyypqAzz
 
41
 0: aabcxyzpqrrrabbxyyyypqAzz
 
42
    aaabcxyzpqrrrabbxyyyypAzz
 
43
 0: aaabcxyzpqrrrabbxyyyypAzz
 
44
    aaabcxyzpqrrrabbxyyyypqAzz
 
45
 0: aaabcxyzpqrrrabbxyyyypqAzz
 
46
    aaabcxyzpqrrrabbxyyyypqqAzz
 
47
 0: aaabcxyzpqrrrabbxyyyypqqAzz
 
48
    aaabcxyzpqrrrabbxyyyypqqqAzz
 
49
 0: aaabcxyzpqrrrabbxyyyypqqqAzz
 
50
    aaabcxyzpqrrrabbxyyyypqqqqAzz
 
51
 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
 
52
    aaabcxyzpqrrrabbxyyyypqqqqqAzz
 
53
 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
 
54
    aaabcxyzpqrrrabbxyyyypqqqqqqAzz
 
55
 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
 
56
    aaaabcxyzpqrrrabbxyyyypqAzz
 
57
 0: aaaabcxyzpqrrrabbxyyyypqAzz
 
58
    abxyzzpqrrrabbxyyyypqAzz
 
59
 0: abxyzzpqrrrabbxyyyypqAzz
 
60
    aabxyzzzpqrrrabbxyyyypqAzz
 
61
 0: aabxyzzzpqrrrabbxyyyypqAzz
 
62
    aaabxyzzzzpqrrrabbxyyyypqAzz
 
63
 0: aaabxyzzzzpqrrrabbxyyyypqAzz
 
64
    aaaabxyzzzzpqrrrabbxyyyypqAzz
 
65
 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
 
66
    abcxyzzpqrrrabbxyyyypqAzz
 
67
 0: abcxyzzpqrrrabbxyyyypqAzz
 
68
    aabcxyzzzpqrrrabbxyyyypqAzz
 
69
 0: aabcxyzzzpqrrrabbxyyyypqAzz
 
70
    aaabcxyzzzzpqrrrabbxyyyypqAzz
 
71
 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
 
72
    aaaabcxyzzzzpqrrrabbxyyyypqAzz
 
73
 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
 
74
    aaaabcxyzzzzpqrrrabbbxyyyypqAzz
 
75
 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
 
76
    aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
 
77
 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
 
78
    aaabcxyzpqrrrabbxyyyypABzz
 
79
 0: aaabcxyzpqrrrabbxyyyypABzz
 
80
    aaabcxyzpqrrrabbxyyyypABBzz
 
81
 0: aaabcxyzpqrrrabbxyyyypABBzz
 
82
    >>>aaabxyzpqrrrabbxyyyypqAzz
 
83
 0: aaabxyzpqrrrabbxyyyypqAzz
 
84
    >aaaabxyzpqrrrabbxyyyypqAzz
 
85
 0: aaaabxyzpqrrrabbxyyyypqAzz
 
86
    >>>>abcxyzpqrrrabbxyyyypqAzz
 
87
 0: abcxyzpqrrrabbxyyyypqAzz
 
88
    *** Failers
 
89
No match
 
90
    abxyzpqrrabbxyyyypqAzz
 
91
No match
 
92
    abxyzpqrrrrabbxyyyypqAzz
 
93
No match
 
94
    abxyzpqrrrabxyyyypqAzz
 
95
No match
 
96
    aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
 
97
No match
 
98
    aaaabcxyzzzzpqrrrabbbxyyypqAzz
 
99
No match
 
100
    aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
 
101
No match
 
102
 
 
103
/^(abc){1,2}zz/
 
104
    abczz
 
105
 0: abczz
 
106
 1: abc
 
107
    abcabczz
 
108
 0: abcabczz
 
109
 1: abc
 
110
    *** Failers
 
111
No match
 
112
    zz
 
113
No match
 
114
    abcabcabczz
 
115
No match
 
116
    >>abczz
 
117
No match
 
118
 
 
119
/^(b+?|a){1,2}?c/
 
120
    bc
 
121
 0: bc
 
122
 1: b
 
123
    bbc
 
124
 0: bbc
 
125
 1: b
 
126
    bbbc
 
127
 0: bbbc
 
128
 1: bb
 
129
    bac
 
130
 0: bac
 
131
 1: a
 
132
    bbac
 
133
 0: bbac
 
134
 1: a
 
135
    aac
 
136
 0: aac
 
137
 1: a
 
138
    abbbbbbbbbbbc
 
139
 0: abbbbbbbbbbbc
 
140
 1: bbbbbbbbbbb
 
141
    bbbbbbbbbbbac
 
142
 0: bbbbbbbbbbbac
 
143
 1: a
 
144
    *** Failers
 
145
No match
 
146
    aaac
 
147
No match
 
148
    abbbbbbbbbbbac
 
149
No match
 
150
 
 
151
/^(b+|a){1,2}c/
 
152
    bc
 
153
 0: bc
 
154
 1: b
 
155
    bbc
 
156
 0: bbc
 
157
 1: bb
 
158
    bbbc
 
159
 0: bbbc
 
160
 1: bbb
 
161
    bac
 
162
 0: bac
 
163
 1: a
 
164
    bbac
 
165
 0: bbac
 
166
 1: a
 
167
    aac
 
168
 0: aac
 
169
 1: a
 
170
    abbbbbbbbbbbc
 
171
 0: abbbbbbbbbbbc
 
172
 1: bbbbbbbbbbb
 
173
    bbbbbbbbbbbac
 
174
 0: bbbbbbbbbbbac
 
175
 1: a
 
176
    *** Failers
 
177
No match
 
178
    aaac
 
179
No match
 
180
    abbbbbbbbbbbac
 
181
No match
 
182
 
 
183
/^(b+|a){1,2}?bc/
 
184
    bbc
 
185
 0: bbc
 
186
 1: b
 
187
 
 
188
/^(b*|ba){1,2}?bc/
 
189
    babc
 
190
 0: babc
 
191
 1: ba
 
192
    bbabc
 
193
 0: bbabc
 
194
 1: ba
 
195
    bababc
 
196
 0: bababc
 
197
 1: ba
 
198
    *** Failers
 
199
No match
 
200
    bababbc
 
201
No match
 
202
    babababc
 
203
No match
 
204
 
 
205
/^(ba|b*){1,2}?bc/
 
206
    babc
 
207
 0: babc
 
208
 1: ba
 
209
    bbabc
 
210
 0: bbabc
 
211
 1: ba
 
212
    bababc
 
213
 0: bababc
 
214
 1: ba
 
215
    *** Failers
 
216
No match
 
217
    bababbc
 
218
No match
 
219
    babababc
 
220
No match
 
221
 
 
222
/^\ca\cA\c[\c{\c:/
 
223
    \x01\x01\e;z
 
224
 0: \x01\x01\x1b;z
 
225
 
 
226
/^[ab\]cde]/
 
227
    athing
 
228
 0: a
 
229
    bthing
 
230
 0: b
 
231
    ]thing
 
232
 0: ]
 
233
    cthing
 
234
 0: c
 
235
    dthing
 
236
 0: d
 
237
    ething
 
238
 0: e
 
239
    *** Failers
 
240
No match
 
241
    fthing
 
242
No match
 
243
    [thing
 
244
No match
 
245
    \\thing
 
246
No match
 
247
 
 
248
/^[]cde]/
 
249
    ]thing
 
250
 0: ]
 
251
    cthing
 
252
 0: c
 
253
    dthing
 
254
 0: d
 
255
    ething
 
256
 0: e
 
257
    *** Failers
 
258
No match
 
259
    athing
 
260
No match
 
261
    fthing
 
262
No match
 
263
 
 
264
/^[^ab\]cde]/
 
265
    fthing
 
266
 0: f
 
267
    [thing
 
268
 0: [
 
269
    \\thing
 
270
 0: \
 
271
    *** Failers
 
272
 0: *
 
273
    athing
 
274
No match
 
275
    bthing
 
276
No match
 
277
    ]thing
 
278
No match
 
279
    cthing
 
280
No match
 
281
    dthing
 
282
No match
 
283
    ething
 
284
No match
 
285
 
 
286
/^[^]cde]/
 
287
    athing
 
288
 0: a
 
289
    fthing
 
290
 0: f
 
291
    *** Failers
 
292
 0: *
 
293
    ]thing
 
294
No match
 
295
    cthing
 
296
No match
 
297
    dthing
 
298
No match
 
299
    ething
 
300
No match
 
301
 
 
302
/^\�/
 
303
    �
 
304
 0: \x81
 
305
 
 
306
/^�/
 
307
    �
 
308
 0: \xff
 
309
 
 
310
/^[0-9]+$/
 
311
    0
 
312
 0: 0
 
313
    1
 
314
 0: 1
 
315
    2
 
316
 0: 2
 
317
    3
 
318
 0: 3
 
319
    4
 
320
 0: 4
 
321
    5
 
322
 0: 5
 
323
    6
 
324
 0: 6
 
325
    7
 
326
 0: 7
 
327
    8
 
328
 0: 8
 
329
    9
 
330
 0: 9
 
331
    10
 
332
 0: 10
 
333
    100
 
334
 0: 100
 
335
    *** Failers
 
336
No match
 
337
    abc
 
338
No match
 
339
 
 
340
/^.*nter/
 
341
    enter
 
342
 0: enter
 
343
    inter
 
344
 0: inter
 
345
    uponter
 
346
 0: uponter
 
347
 
 
348
/^xxx[0-9]+$/
 
349
    xxx0
 
350
 0: xxx0
 
351
    xxx1234
 
352
 0: xxx1234
 
353
    *** Failers
 
354
No match
 
355
    xxx
 
356
No match
 
357
 
 
358
/^.+[0-9][0-9][0-9]$/
 
359
    x123
 
360
 0: x123
 
361
    xx123
 
362
 0: xx123
 
363
    123456
 
364
 0: 123456
 
365
    *** Failers
 
366
No match
 
367
    123
 
368
No match
 
369
    x1234
 
370
 0: x1234
 
371
 
 
372
/^.+?[0-9][0-9][0-9]$/
 
373
    x123
 
374
 0: x123
 
375
    xx123
 
376
 0: xx123
 
377
    123456
 
378
 0: 123456
 
379
    *** Failers
 
380
No match
 
381
    123
 
382
No match
 
383
    x1234
 
384
 0: x1234
 
385
 
 
386
/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
 
387
    abc!pqr=apquxz.ixr.zzz.ac.uk
 
388
 0: abc!pqr=apquxz.ixr.zzz.ac.uk
 
389
 1: abc
 
390
 2: pqr
 
391
    *** Failers
 
392
No match
 
393
    !pqr=apquxz.ixr.zzz.ac.uk
 
394
No match
 
395
    abc!=apquxz.ixr.zzz.ac.uk
 
396
No match
 
397
    abc!pqr=apquxz:ixr.zzz.ac.uk
 
398
No match
 
399
    abc!pqr=apquxz.ixr.zzz.ac.ukk
 
400
No match
 
401
 
 
402
/:/
 
403
    Well, we need a colon: somewhere
 
404
 0: :
 
405
    *** Fail if we don't
 
406
No match
 
407
 
 
408
/([\da-f:]+)$/i
 
409
    0abc
 
410
 0: 0abc
 
411
 1: 0abc
 
412
    abc
 
413
 0: abc
 
414
 1: abc
 
415
    fed
 
416
 0: fed
 
417
 1: fed
 
418
    E
 
419
 0: E
 
420
 1: E
 
421
    ::
 
422
 0: ::
 
423
 1: ::
 
424
    5f03:12C0::932e
 
425
 0: 5f03:12C0::932e
 
426
 1: 5f03:12C0::932e
 
427
    fed def
 
428
 0: def
 
429
 1: def
 
430
    Any old stuff
 
431
 0: ff
 
432
 1: ff
 
433
    *** Failers
 
434
No match
 
435
    0zzz
 
436
No match
 
437
    gzzz
 
438
No match
 
439
    fed\x20
 
440
No match
 
441
    Any old rubbish
 
442
No match
 
443
 
 
444
/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
 
445
    .1.2.3
 
446
 0: .1.2.3
 
447
 1: 1
 
448
 2: 2
 
449
 3: 3
 
450
    A.12.123.0
 
451
 0: A.12.123.0
 
452
 1: 12
 
453
 2: 123
 
454
 3: 0
 
455
    *** Failers
 
456
No match
 
457
    .1.2.3333
 
458
No match
 
459
    1.2.3
 
460
No match
 
461
    1234.2.3
 
462
No match
 
463
 
 
464
/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
 
465
    1 IN SOA non-sp1 non-sp2(
 
466
 0: 1 IN SOA non-sp1 non-sp2(
 
467
 1: 1
 
468
 2: non-sp1
 
469
 3: non-sp2
 
470
    1    IN    SOA    non-sp1    non-sp2   (
 
471
 0: 1    IN    SOA    non-sp1    non-sp2   (
 
472
 1: 1
 
473
 2: non-sp1
 
474
 3: non-sp2
 
475
    *** Failers
 
476
No match
 
477
    1IN SOA non-sp1 non-sp2(
 
478
No match
 
479
 
 
480
/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
 
481
    a.
 
482
 0: a.
 
483
    Z.
 
484
 0: Z.
 
485
    2.
 
486
 0: 2.
 
487
    ab-c.pq-r.
 
488
 0: ab-c.pq-r.
 
489
 1: .pq-r
 
490
    sxk.zzz.ac.uk.
 
491
 0: sxk.zzz.ac.uk.
 
492
 1: .uk
 
493
    x-.y-.
 
494
 0: x-.y-.
 
495
 1: .y-
 
496
    *** Failers
 
497
No match
 
498
    -abc.peq.
 
499
No match
 
500
 
 
501
/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
 
502
    *.a
 
503
 0: *.a
 
504
    *.b0-a
 
505
 0: *.b0-a
 
506
 1: 0-a
 
507
    *.c3-b.c
 
508
 0: *.c3-b.c
 
509
 1: 3-b
 
510
 2: .c
 
511
    *.c-a.b-c
 
512
 0: *.c-a.b-c
 
513
 1: -a
 
514
 2: .b-c
 
515
 3: -c
 
516
    *** Failers
 
517
No match
 
518
    *.0
 
519
No match
 
520
    *.a-
 
521
No match
 
522
    *.a-b.c-
 
523
No match
 
524
    *.c-a.0-c
 
525
No match
 
526
 
 
527
/^(?=ab(de))(abd)(e)/
 
528
    abde
 
529
 0: abde
 
530
 1: de
 
531
 2: abd
 
532
 3: e
 
533
 
 
534
/^(?!(ab)de|x)(abd)(f)/
 
535
    abdf
 
536
 0: abdf
 
537
 1: <unset>
 
538
 2: abd
 
539
 3: f
 
540
 
 
541
/^(?=(ab(cd)))(ab)/
 
542
    abcd
 
543
 0: ab
 
544
 1: abcd
 
545
 2: cd
 
546
 3: ab
 
547
 
 
548
/^[\da-f](\.[\da-f])*$/i
 
549
    a.b.c.d
 
550
 0: a.b.c.d
 
551
 1: .d
 
552
    A.B.C.D
 
553
 0: A.B.C.D
 
554
 1: .D
 
555
    a.b.c.1.2.3.C
 
556
 0: a.b.c.1.2.3.C
 
557
 1: .C
 
558
 
 
559
/^\".*\"\s*(;.*)?$/
 
560
    \"1234\"
 
561
 0: "1234"
 
562
    \"abcd\" ;
 
563
 0: "abcd" ;
 
564
 1: ;
 
565
    \"\" ; rhubarb
 
566
 0: "" ; rhubarb
 
567
 1: ; rhubarb
 
568
    *** Failers
 
569
No match
 
570
    \"1234\" : things
 
571
No match
 
572
 
 
573
/^$/
 
574
    \
 
575
 0: 
 
576
    *** Failers
 
577
No match
 
578
 
 
579
/   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
 
580
    ab c
 
581
 0: ab c
 
582
    *** Failers
 
583
No match
 
584
    abc
 
585
No match
 
586
    ab cde
 
587
No match
 
588
 
 
589
/(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
 
590
    ab c
 
591
 0: ab c
 
592
    *** Failers
 
593
No match
 
594
    abc
 
595
No match
 
596
    ab cde
 
597
No match
 
598
 
 
599
/^   a\ b[c ]d       $/x
 
600
    a bcd
 
601
 0: a bcd
 
602
    a b d
 
603
 0: a b d
 
604
    *** Failers
 
605
No match
 
606
    abcd
 
607
No match
 
608
    ab d
 
609
No match
 
610
 
 
611
/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
 
612
    abcdefhijklm
 
613
 0: abcdefhijklm
 
614
 1: abc
 
615
 2: bc
 
616
 3: c
 
617
 4: def
 
618
 5: ef
 
619
 6: f
 
620
 7: hij
 
621
 8: ij
 
622
 9: j
 
623
10: klm
 
624
11: lm
 
625
12: m
 
626
 
 
627
/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
 
628
    abcdefhijklm
 
629
 0: abcdefhijklm
 
630
 1: bc
 
631
 2: c
 
632
 3: ef
 
633
 4: f
 
634
 5: ij
 
635
 6: j
 
636
 7: lm
 
637
 8: m
 
638
 
 
639
/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
 
640
    a+ Z0+\x08\n\x1d\x12
 
641
 0: a+ Z0+\x08\x0a\x1d\x12
 
642
 
 
643
/^[.^$|()*+?{,}]+/
 
644
    .^\$(*+)|{?,?}
 
645
 0: .^$(*+)|{?,?}
 
646
 
 
647
/^a*\w/
 
648
    z
 
649
 0: z
 
650
    az
 
651
 0: az
 
652
    aaaz
 
653
 0: aaaz
 
654
    a
 
655
 0: a
 
656
    aa
 
657
 0: aa
 
658
    aaaa
 
659
 0: aaaa
 
660
    a+
 
661
 0: a
 
662
    aa+
 
663
 0: aa
 
664
 
 
665
/^a*?\w/
 
666
    z
 
667
 0: z
 
668
    az
 
669
 0: a
 
670
    aaaz
 
671
 0: a
 
672
    a
 
673
 0: a
 
674
    aa
 
675
 0: a
 
676
    aaaa
 
677
 0: a
 
678
    a+
 
679
 0: a
 
680
    aa+
 
681
 0: a
 
682
 
 
683
/^a+\w/
 
684
    az
 
685
 0: az
 
686
    aaaz
 
687
 0: aaaz
 
688
    aa
 
689
 0: aa
 
690
    aaaa
 
691
 0: aaaa
 
692
    aa+
 
693
 0: aa
 
694
 
 
695
/^a+?\w/
 
696
    az
 
697
 0: az
 
698
    aaaz
 
699
 0: aa
 
700
    aa
 
701
 0: aa
 
702
    aaaa
 
703
 0: aa
 
704
    aa+
 
705
 0: aa
 
706
 
 
707
/^\d{8}\w{2,}/
 
708
    1234567890
 
709
 0: 1234567890
 
710
    12345678ab
 
711
 0: 12345678ab
 
712
    12345678__
 
713
 0: 12345678__
 
714
    *** Failers
 
715
No match
 
716
    1234567
 
717
No match
 
718
 
 
719
/^[aeiou\d]{4,5}$/
 
720
    uoie
 
721
 0: uoie
 
722
    1234
 
723
 0: 1234
 
724
    12345
 
725
 0: 12345
 
726
    aaaaa
 
727
 0: aaaaa
 
728
    *** Failers
 
729
No match
 
730
    123456
 
731
No match
 
732
 
 
733
/^[aeiou\d]{4,5}?/
 
734
    uoie
 
735
 0: uoie
 
736
    1234
 
737
 0: 1234
 
738
    12345
 
739
 0: 1234
 
740
    aaaaa
 
741
 0: aaaa
 
742
    123456
 
743
 0: 1234
 
744
 
 
745
/\A(abc|def)=(\1){2,3}\Z/
 
746
    abc=abcabc
 
747
 0: abc=abcabc
 
748
 1: abc
 
749
 2: abc
 
750
    def=defdefdef
 
751
 0: def=defdefdef
 
752
 1: def
 
753
 2: def
 
754
    *** Failers
 
755
No match
 
756
    abc=defdef
 
757
No match
 
758
 
 
759
/^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
 
760
    abcdefghijkcda2
 
761
 0: abcdefghijkcda2
 
762
 1: a
 
763
 2: b
 
764
 3: c
 
765
 4: d
 
766
 5: e
 
767
 6: f
 
768
 7: g
 
769
 8: h
 
770
 9: i
 
771
10: j
 
772
11: k
 
773
12: cd
 
774
    abcdefghijkkkkcda2
 
775
 0: abcdefghijkkkkcda2
 
776
 1: a
 
777
 2: b
 
778
 3: c
 
779
 4: d
 
780
 5: e
 
781
 6: f
 
782
 7: g
 
783
 8: h
 
784
 9: i
 
785
10: j
 
786
11: k
 
787
12: cd
 
788
 
 
789
/(cat(a(ract|tonic)|erpillar)) \1()2(3)/
 
790
    cataract cataract23
 
791
 0: cataract cataract23
 
792
 1: cataract
 
793
 2: aract
 
794
 3: ract
 
795
 4: 
 
796
 5: 3
 
797
    catatonic catatonic23
 
798
 0: catatonic catatonic23
 
799
 1: catatonic
 
800
 2: atonic
 
801
 3: tonic
 
802
 4: 
 
803
 5: 3
 
804
    caterpillar caterpillar23
 
805
 0: caterpillar caterpillar23
 
806
 1: caterpillar
 
807
 2: erpillar
 
808
 3: <unset>
 
809
 4: 
 
810
 5: 3
 
811
 
 
812
 
 
813
/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
 
814
    From abcd  Mon Sep 01 12:33:02 1997
 
815
 0: From abcd  Mon Sep 01 12:33
 
816
 1: abcd
 
817
 
 
818
/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
 
819
    From abcd  Mon Sep 01 12:33:02 1997
 
820
 0: From abcd  Mon Sep 01 12:33
 
821
 1: Sep 
 
822
    From abcd  Mon Sep  1 12:33:02 1997
 
823
 0: From abcd  Mon Sep  1 12:33
 
824
 1: Sep  
 
825
    *** Failers
 
826
No match
 
827
    From abcd  Sep 01 12:33:02 1997
 
828
No match
 
829
 
 
830
/^12.34/s
 
831
    12\n34
 
832
 0: 12\x0a34
 
833
    12\r34
 
834
 0: 12\x0d34
 
835
 
 
836
/\w+(?=\t)/
 
837
    the quick brown\t fox
 
838
 0: brown
 
839
 
 
840
/foo(?!bar)(.*)/
 
841
    foobar is foolish see?
 
842
 0: foolish see?
 
843
 1: lish see?
 
844
 
 
845
/(?:(?!foo)...|^.{0,2})bar(.*)/
 
846
    foobar crowbar etc
 
847
 0: rowbar etc
 
848
 1:  etc
 
849
    barrel
 
850
 0: barrel
 
851
 1: rel
 
852
    2barrel
 
853
 0: 2barrel
 
854
 1: rel
 
855
    A barrel
 
856
 0: A barrel
 
857
 1: rel
 
858
 
 
859
/^(\D*)(?=\d)(?!123)/
 
860
    abc456
 
861
 0: abc
 
862
 1: abc
 
863
    *** Failers
 
864
No match
 
865
    abc123
 
866
No match
 
867
 
 
868
/^1234(?# test newlines
 
869
  inside)/
 
870
    1234
 
871
 0: 1234
 
872
 
 
873
/^1234 #comment in extended re
 
874
  /x
 
875
    1234
 
876
 0: 1234
 
877
 
 
878
/#rhubarb
 
879
  abcd/x
 
880
    abcd
 
881
 0: abcd
 
882
 
 
883
/^abcd#rhubarb/x
 
884
    abcd
 
885
 0: abcd
 
886
 
 
887
/^(a)\1{2,3}(.)/
 
888
    aaab
 
889
 0: aaab
 
890
 1: a
 
891
 2: b
 
892
    aaaab
 
893
 0: aaaab
 
894
 1: a
 
895
 2: b
 
896
    aaaaab
 
897
 0: aaaaa
 
898
 1: a
 
899
 2: a
 
900
    aaaaaab
 
901
 0: aaaaa
 
902
 1: a
 
903
 2: a
 
904
 
 
905
/(?!^)abc/
 
906
    the abc
 
907
 0: abc
 
908
    *** Failers
 
909
No match
 
910
    abc
 
911
No match
 
912
 
 
913
/(?=^)abc/
 
914
    abc
 
915
 0: abc
 
916
    *** Failers
 
917
No match
 
918
    the abc
 
919
No match
 
920
 
 
921
/^[ab]{1,3}(ab*|b)/
 
922
    aabbbbb
 
923
 0: aabb
 
924
 1: b
 
925
 
 
926
/^[ab]{1,3}?(ab*|b)/
 
927
    aabbbbb
 
928
 0: aabbbbb
 
929
 1: abbbbb
 
930
 
 
931
/^[ab]{1,3}?(ab*?|b)/
 
932
    aabbbbb
 
933
 0: aa
 
934
 1: a
 
935
 
 
936
/^[ab]{1,3}(ab*?|b)/
 
937
    aabbbbb
 
938
 0: aabb
 
939
 1: b
 
940
 
 
941
/  (?: [\040\t] |  \(
 
942
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
943
\)  )*                          # optional leading comment
 
944
(?:    (?:
 
945
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
946
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
947
|
 
948
" (?:                      # opening quote...
 
949
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
950
|                     #    or
 
951
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
952
)* "  # closing quote
 
953
)                    # initial word
 
954
(?:  (?: [\040\t] |  \(
 
955
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
956
\)  )*  \.  (?: [\040\t] |  \(
 
957
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
958
\)  )*   (?:
 
959
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
960
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
961
|
 
962
" (?:                      # opening quote...
 
963
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
964
|                     #    or
 
965
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
966
)* "  # closing quote
 
967
)  )* # further okay, if led by a period
 
968
(?: [\040\t] |  \(
 
969
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
970
\)  )*  @  (?: [\040\t] |  \(
 
971
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
972
\)  )*    (?:
 
973
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
974
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
975
|   \[                         # [
 
976
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
977
\]                        #           ]
 
978
)                           # initial subdomain
 
979
(?:                                  #
 
980
(?: [\040\t] |  \(
 
981
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
982
\)  )*  \.                        # if led by a period...
 
983
(?: [\040\t] |  \(
 
984
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
985
\)  )*   (?:
 
986
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
987
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
988
|   \[                         # [
 
989
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
990
\]                        #           ]
 
991
)                     #   ...further okay
 
992
)*
 
993
# address
 
994
|                     #  or
 
995
(?:
 
996
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
997
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
998
|
 
999
" (?:                      # opening quote...
 
1000
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1001
|                     #    or
 
1002
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1003
)* "  # closing quote
 
1004
)             # one word, optionally followed by....
 
1005
(?:
 
1006
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
 
1007
\(
 
1008
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1009
\)       |  # comments, or...
 
1010
 
 
1011
" (?:                      # opening quote...
 
1012
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1013
|                     #    or
 
1014
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1015
)* "  # closing quote
 
1016
# quoted strings
 
1017
)*
 
1018
<  (?: [\040\t] |  \(
 
1019
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1020
\)  )*                     # leading <
 
1021
(?:  @  (?: [\040\t] |  \(
 
1022
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1023
\)  )*    (?:
 
1024
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1025
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1026
|   \[                         # [
 
1027
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1028
\]                        #           ]
 
1029
)                           # initial subdomain
 
1030
(?:                                  #
 
1031
(?: [\040\t] |  \(
 
1032
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1033
\)  )*  \.                        # if led by a period...
 
1034
(?: [\040\t] |  \(
 
1035
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1036
\)  )*   (?:
 
1037
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1038
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1039
|   \[                         # [
 
1040
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1041
\]                        #           ]
 
1042
)                     #   ...further okay
 
1043
)*
 
1044
 
 
1045
(?:  (?: [\040\t] |  \(
 
1046
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1047
\)  )*  ,  (?: [\040\t] |  \(
 
1048
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1049
\)  )*  @  (?: [\040\t] |  \(
 
1050
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1051
\)  )*    (?:
 
1052
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1053
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1054
|   \[                         # [
 
1055
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1056
\]                        #           ]
 
1057
)                           # initial subdomain
 
1058
(?:                                  #
 
1059
(?: [\040\t] |  \(
 
1060
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1061
\)  )*  \.                        # if led by a period...
 
1062
(?: [\040\t] |  \(
 
1063
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1064
\)  )*   (?:
 
1065
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1066
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1067
|   \[                         # [
 
1068
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1069
\]                        #           ]
 
1070
)                     #   ...further okay
 
1071
)*
 
1072
)* # further okay, if led by comma
 
1073
:                                # closing colon
 
1074
(?: [\040\t] |  \(
 
1075
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1076
\)  )*  )? #       optional route
 
1077
(?:
 
1078
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1079
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1080
|
 
1081
" (?:                      # opening quote...
 
1082
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1083
|                     #    or
 
1084
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1085
)* "  # closing quote
 
1086
)                    # initial word
 
1087
(?:  (?: [\040\t] |  \(
 
1088
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1089
\)  )*  \.  (?: [\040\t] |  \(
 
1090
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1091
\)  )*   (?:
 
1092
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1093
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1094
|
 
1095
" (?:                      # opening quote...
 
1096
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1097
|                     #    or
 
1098
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1099
)* "  # closing quote
 
1100
)  )* # further okay, if led by a period
 
1101
(?: [\040\t] |  \(
 
1102
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1103
\)  )*  @  (?: [\040\t] |  \(
 
1104
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1105
\)  )*    (?:
 
1106
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1107
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1108
|   \[                         # [
 
1109
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1110
\]                        #           ]
 
1111
)                           # initial subdomain
 
1112
(?:                                  #
 
1113
(?: [\040\t] |  \(
 
1114
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1115
\)  )*  \.                        # if led by a period...
 
1116
(?: [\040\t] |  \(
 
1117
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1118
\)  )*   (?:
 
1119
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1120
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1121
|   \[                         # [
 
1122
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1123
\]                        #           ]
 
1124
)                     #   ...further okay
 
1125
)*
 
1126
#       address spec
 
1127
(?: [\040\t] |  \(
 
1128
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1129
\)  )*  > #                  trailing >
 
1130
# name and address
 
1131
)  (?: [\040\t] |  \(
 
1132
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1133
\)  )*                       # optional trailing comment
 
1134
/x
 
1135
    Alan Other <user\@dom.ain>
 
1136
 0: Alan Other <user@dom.ain>
 
1137
    <user\@dom.ain>
 
1138
 0: user@dom.ain
 
1139
    user\@dom.ain
 
1140
 0: user@dom.ain
 
1141
    \"A. Other\" <user.1234\@dom.ain> (a comment)
 
1142
 0: "A. Other" <user.1234@dom.ain> (a comment)
 
1143
    A. Other <user.1234\@dom.ain> (a comment)
 
1144
 0:  Other <user.1234@dom.ain> (a comment)
 
1145
    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
 
1146
 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
 
1147
    A missing angle <user\@some.where
 
1148
 0: user@some.where
 
1149
    *** Failers
 
1150
No match
 
1151
    The quick brown fox
 
1152
No match
 
1153
 
 
1154
/[\040\t]*                    # Nab whitespace.
 
1155
(?:
 
1156
\(                              #  (
 
1157
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1158
(?:                                 #       (
 
1159
(?:  \\ [^\x80-\xff]  |
 
1160
\(                            #  (
 
1161
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1162
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1163
\)                           #                       )
 
1164
)    #         special
 
1165
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1166
)*                                  #            )*
 
1167
\)                             #                )
 
1168
[\040\t]* )*    # If comment found, allow more spaces.
 
1169
# optional leading comment
 
1170
(?:
 
1171
(?:
 
1172
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1173
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1174
# Atom
 
1175
|                       #  or
 
1176
"                                     # "
 
1177
[^\\\x80-\xff\n\015"] *                            #   normal
 
1178
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1179
"                                     #        "
 
1180
# Quoted string
 
1181
)
 
1182
[\040\t]*                    # Nab whitespace.
 
1183
(?:
 
1184
\(                              #  (
 
1185
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1186
(?:                                 #       (
 
1187
(?:  \\ [^\x80-\xff]  |
 
1188
\(                            #  (
 
1189
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1190
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1191
\)                           #                       )
 
1192
)    #         special
 
1193
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1194
)*                                  #            )*
 
1195
\)                             #                )
 
1196
[\040\t]* )*    # If comment found, allow more spaces.
 
1197
(?:
 
1198
\.
 
1199
[\040\t]*                    # Nab whitespace.
 
1200
(?:
 
1201
\(                              #  (
 
1202
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1203
(?:                                 #       (
 
1204
(?:  \\ [^\x80-\xff]  |
 
1205
\(                            #  (
 
1206
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1207
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1208
\)                           #                       )
 
1209
)    #         special
 
1210
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1211
)*                                  #            )*
 
1212
\)                             #                )
 
1213
[\040\t]* )*    # If comment found, allow more spaces.
 
1214
(?:
 
1215
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1216
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1217
# Atom
 
1218
|                       #  or
 
1219
"                                     # "
 
1220
[^\\\x80-\xff\n\015"] *                            #   normal
 
1221
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1222
"                                     #        "
 
1223
# Quoted string
 
1224
)
 
1225
[\040\t]*                    # Nab whitespace.
 
1226
(?:
 
1227
\(                              #  (
 
1228
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1229
(?:                                 #       (
 
1230
(?:  \\ [^\x80-\xff]  |
 
1231
\(                            #  (
 
1232
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1233
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1234
\)                           #                       )
 
1235
)    #         special
 
1236
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1237
)*                                  #            )*
 
1238
\)                             #                )
 
1239
[\040\t]* )*    # If comment found, allow more spaces.
 
1240
# additional words
 
1241
)*
 
1242
@
 
1243
[\040\t]*                    # Nab whitespace.
 
1244
(?:
 
1245
\(                              #  (
 
1246
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1247
(?:                                 #       (
 
1248
(?:  \\ [^\x80-\xff]  |
 
1249
\(                            #  (
 
1250
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1251
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1252
\)                           #                       )
 
1253
)    #         special
 
1254
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1255
)*                                  #            )*
 
1256
\)                             #                )
 
1257
[\040\t]* )*    # If comment found, allow more spaces.
 
1258
(?:
 
1259
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1260
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1261
|
 
1262
\[                            # [
 
1263
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1264
\]                           #           ]
 
1265
)
 
1266
[\040\t]*                    # Nab whitespace.
 
1267
(?:
 
1268
\(                              #  (
 
1269
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1270
(?:                                 #       (
 
1271
(?:  \\ [^\x80-\xff]  |
 
1272
\(                            #  (
 
1273
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1274
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1275
\)                           #                       )
 
1276
)    #         special
 
1277
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1278
)*                                  #            )*
 
1279
\)                             #                )
 
1280
[\040\t]* )*    # If comment found, allow more spaces.
 
1281
# optional trailing comments
 
1282
(?:
 
1283
\.
 
1284
[\040\t]*                    # Nab whitespace.
 
1285
(?:
 
1286
\(                              #  (
 
1287
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1288
(?:                                 #       (
 
1289
(?:  \\ [^\x80-\xff]  |
 
1290
\(                            #  (
 
1291
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1292
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1293
\)                           #                       )
 
1294
)    #         special
 
1295
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1296
)*                                  #            )*
 
1297
\)                             #                )
 
1298
[\040\t]* )*    # If comment found, allow more spaces.
 
1299
(?:
 
1300
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1301
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1302
|
 
1303
\[                            # [
 
1304
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1305
\]                           #           ]
 
1306
)
 
1307
[\040\t]*                    # Nab whitespace.
 
1308
(?:
 
1309
\(                              #  (
 
1310
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1311
(?:                                 #       (
 
1312
(?:  \\ [^\x80-\xff]  |
 
1313
\(                            #  (
 
1314
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1315
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1316
\)                           #                       )
 
1317
)    #         special
 
1318
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1319
)*                                  #            )*
 
1320
\)                             #                )
 
1321
[\040\t]* )*    # If comment found, allow more spaces.
 
1322
# optional trailing comments
 
1323
)*
 
1324
# address
 
1325
|                             #  or
 
1326
(?:
 
1327
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1328
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1329
# Atom
 
1330
|                       #  or
 
1331
"                                     # "
 
1332
[^\\\x80-\xff\n\015"] *                            #   normal
 
1333
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1334
"                                     #        "
 
1335
# Quoted string
 
1336
)
 
1337
# leading word
 
1338
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
 
1339
(?:
 
1340
(?:
 
1341
\(                              #  (
 
1342
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1343
(?:                                 #       (
 
1344
(?:  \\ [^\x80-\xff]  |
 
1345
\(                            #  (
 
1346
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1347
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1348
\)                           #                       )
 
1349
)    #         special
 
1350
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1351
)*                                  #            )*
 
1352
\)                             #                )
 
1353
|
 
1354
"                                     # "
 
1355
[^\\\x80-\xff\n\015"] *                            #   normal
 
1356
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1357
"                                     #        "
 
1358
) # "special" comment or quoted string
 
1359
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
 
1360
)*
 
1361
<
 
1362
[\040\t]*                    # Nab whitespace.
 
1363
(?:
 
1364
\(                              #  (
 
1365
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1366
(?:                                 #       (
 
1367
(?:  \\ [^\x80-\xff]  |
 
1368
\(                            #  (
 
1369
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1370
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1371
\)                           #                       )
 
1372
)    #         special
 
1373
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1374
)*                                  #            )*
 
1375
\)                             #                )
 
1376
[\040\t]* )*    # If comment found, allow more spaces.
 
1377
# <
 
1378
(?:
 
1379
@
 
1380
[\040\t]*                    # Nab whitespace.
 
1381
(?:
 
1382
\(                              #  (
 
1383
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1384
(?:                                 #       (
 
1385
(?:  \\ [^\x80-\xff]  |
 
1386
\(                            #  (
 
1387
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1388
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1389
\)                           #                       )
 
1390
)    #         special
 
1391
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1392
)*                                  #            )*
 
1393
\)                             #                )
 
1394
[\040\t]* )*    # If comment found, allow more spaces.
 
1395
(?:
 
1396
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1397
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1398
|
 
1399
\[                            # [
 
1400
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1401
\]                           #           ]
 
1402
)
 
1403
[\040\t]*                    # Nab whitespace.
 
1404
(?:
 
1405
\(                              #  (
 
1406
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1407
(?:                                 #       (
 
1408
(?:  \\ [^\x80-\xff]  |
 
1409
\(                            #  (
 
1410
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1411
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1412
\)                           #                       )
 
1413
)    #         special
 
1414
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1415
)*                                  #            )*
 
1416
\)                             #                )
 
1417
[\040\t]* )*    # If comment found, allow more spaces.
 
1418
# optional trailing comments
 
1419
(?:
 
1420
\.
 
1421
[\040\t]*                    # Nab whitespace.
 
1422
(?:
 
1423
\(                              #  (
 
1424
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1425
(?:                                 #       (
 
1426
(?:  \\ [^\x80-\xff]  |
 
1427
\(                            #  (
 
1428
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1429
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1430
\)                           #                       )
 
1431
)    #         special
 
1432
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1433
)*                                  #            )*
 
1434
\)                             #                )
 
1435
[\040\t]* )*    # If comment found, allow more spaces.
 
1436
(?:
 
1437
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1438
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1439
|
 
1440
\[                            # [
 
1441
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1442
\]                           #           ]
 
1443
)
 
1444
[\040\t]*                    # Nab whitespace.
 
1445
(?:
 
1446
\(                              #  (
 
1447
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1448
(?:                                 #       (
 
1449
(?:  \\ [^\x80-\xff]  |
 
1450
\(                            #  (
 
1451
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1452
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1453
\)                           #                       )
 
1454
)    #         special
 
1455
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1456
)*                                  #            )*
 
1457
\)                             #                )
 
1458
[\040\t]* )*    # If comment found, allow more spaces.
 
1459
# optional trailing comments
 
1460
)*
 
1461
(?: ,
 
1462
[\040\t]*                    # Nab whitespace.
 
1463
(?:
 
1464
\(                              #  (
 
1465
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1466
(?:                                 #       (
 
1467
(?:  \\ [^\x80-\xff]  |
 
1468
\(                            #  (
 
1469
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1470
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1471
\)                           #                       )
 
1472
)    #         special
 
1473
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1474
)*                                  #            )*
 
1475
\)                             #                )
 
1476
[\040\t]* )*    # If comment found, allow more spaces.
 
1477
@
 
1478
[\040\t]*                    # Nab whitespace.
 
1479
(?:
 
1480
\(                              #  (
 
1481
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1482
(?:                                 #       (
 
1483
(?:  \\ [^\x80-\xff]  |
 
1484
\(                            #  (
 
1485
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1486
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1487
\)                           #                       )
 
1488
)    #         special
 
1489
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1490
)*                                  #            )*
 
1491
\)                             #                )
 
1492
[\040\t]* )*    # If comment found, allow more spaces.
 
1493
(?:
 
1494
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1495
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1496
|
 
1497
\[                            # [
 
1498
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1499
\]                           #           ]
 
1500
)
 
1501
[\040\t]*                    # Nab whitespace.
 
1502
(?:
 
1503
\(                              #  (
 
1504
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1505
(?:                                 #       (
 
1506
(?:  \\ [^\x80-\xff]  |
 
1507
\(                            #  (
 
1508
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1509
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1510
\)                           #                       )
 
1511
)    #         special
 
1512
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1513
)*                                  #            )*
 
1514
\)                             #                )
 
1515
[\040\t]* )*    # If comment found, allow more spaces.
 
1516
# optional trailing comments
 
1517
(?:
 
1518
\.
 
1519
[\040\t]*                    # Nab whitespace.
 
1520
(?:
 
1521
\(                              #  (
 
1522
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1523
(?:                                 #       (
 
1524
(?:  \\ [^\x80-\xff]  |
 
1525
\(                            #  (
 
1526
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1527
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1528
\)                           #                       )
 
1529
)    #         special
 
1530
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1531
)*                                  #            )*
 
1532
\)                             #                )
 
1533
[\040\t]* )*    # If comment found, allow more spaces.
 
1534
(?:
 
1535
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1536
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1537
|
 
1538
\[                            # [
 
1539
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1540
\]                           #           ]
 
1541
)
 
1542
[\040\t]*                    # Nab whitespace.
 
1543
(?:
 
1544
\(                              #  (
 
1545
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1546
(?:                                 #       (
 
1547
(?:  \\ [^\x80-\xff]  |
 
1548
\(                            #  (
 
1549
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1550
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1551
\)                           #                       )
 
1552
)    #         special
 
1553
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1554
)*                                  #            )*
 
1555
\)                             #                )
 
1556
[\040\t]* )*    # If comment found, allow more spaces.
 
1557
# optional trailing comments
 
1558
)*
 
1559
)*  # additional domains
 
1560
:
 
1561
[\040\t]*                    # Nab whitespace.
 
1562
(?:
 
1563
\(                              #  (
 
1564
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1565
(?:                                 #       (
 
1566
(?:  \\ [^\x80-\xff]  |
 
1567
\(                            #  (
 
1568
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1569
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1570
\)                           #                       )
 
1571
)    #         special
 
1572
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1573
)*                                  #            )*
 
1574
\)                             #                )
 
1575
[\040\t]* )*    # If comment found, allow more spaces.
 
1576
# optional trailing comments
 
1577
)?     #       optional route
 
1578
(?:
 
1579
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1580
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1581
# Atom
 
1582
|                       #  or
 
1583
"                                     # "
 
1584
[^\\\x80-\xff\n\015"] *                            #   normal
 
1585
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1586
"                                     #        "
 
1587
# Quoted string
 
1588
)
 
1589
[\040\t]*                    # Nab whitespace.
 
1590
(?:
 
1591
\(                              #  (
 
1592
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1593
(?:                                 #       (
 
1594
(?:  \\ [^\x80-\xff]  |
 
1595
\(                            #  (
 
1596
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1597
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1598
\)                           #                       )
 
1599
)    #         special
 
1600
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1601
)*                                  #            )*
 
1602
\)                             #                )
 
1603
[\040\t]* )*    # If comment found, allow more spaces.
 
1604
(?:
 
1605
\.
 
1606
[\040\t]*                    # Nab whitespace.
 
1607
(?:
 
1608
\(                              #  (
 
1609
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1610
(?:                                 #       (
 
1611
(?:  \\ [^\x80-\xff]  |
 
1612
\(                            #  (
 
1613
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1614
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1615
\)                           #                       )
 
1616
)    #         special
 
1617
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1618
)*                                  #            )*
 
1619
\)                             #                )
 
1620
[\040\t]* )*    # If comment found, allow more spaces.
 
1621
(?:
 
1622
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1623
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1624
# Atom
 
1625
|                       #  or
 
1626
"                                     # "
 
1627
[^\\\x80-\xff\n\015"] *                            #   normal
 
1628
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1629
"                                     #        "
 
1630
# Quoted string
 
1631
)
 
1632
[\040\t]*                    # Nab whitespace.
 
1633
(?:
 
1634
\(                              #  (
 
1635
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1636
(?:                                 #       (
 
1637
(?:  \\ [^\x80-\xff]  |
 
1638
\(                            #  (
 
1639
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1640
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1641
\)                           #                       )
 
1642
)    #         special
 
1643
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1644
)*                                  #            )*
 
1645
\)                             #                )
 
1646
[\040\t]* )*    # If comment found, allow more spaces.
 
1647
# additional words
 
1648
)*
 
1649
@
 
1650
[\040\t]*                    # Nab whitespace.
 
1651
(?:
 
1652
\(                              #  (
 
1653
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1654
(?:                                 #       (
 
1655
(?:  \\ [^\x80-\xff]  |
 
1656
\(                            #  (
 
1657
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1658
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1659
\)                           #                       )
 
1660
)    #         special
 
1661
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1662
)*                                  #            )*
 
1663
\)                             #                )
 
1664
[\040\t]* )*    # If comment found, allow more spaces.
 
1665
(?:
 
1666
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1667
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1668
|
 
1669
\[                            # [
 
1670
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1671
\]                           #           ]
 
1672
)
 
1673
[\040\t]*                    # Nab whitespace.
 
1674
(?:
 
1675
\(                              #  (
 
1676
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1677
(?:                                 #       (
 
1678
(?:  \\ [^\x80-\xff]  |
 
1679
\(                            #  (
 
1680
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1681
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1682
\)                           #                       )
 
1683
)    #         special
 
1684
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1685
)*                                  #            )*
 
1686
\)                             #                )
 
1687
[\040\t]* )*    # If comment found, allow more spaces.
 
1688
# optional trailing comments
 
1689
(?:
 
1690
\.
 
1691
[\040\t]*                    # Nab whitespace.
 
1692
(?:
 
1693
\(                              #  (
 
1694
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1695
(?:                                 #       (
 
1696
(?:  \\ [^\x80-\xff]  |
 
1697
\(                            #  (
 
1698
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1699
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1700
\)                           #                       )
 
1701
)    #         special
 
1702
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1703
)*                                  #            )*
 
1704
\)                             #                )
 
1705
[\040\t]* )*    # If comment found, allow more spaces.
 
1706
(?:
 
1707
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1708
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1709
|
 
1710
\[                            # [
 
1711
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1712
\]                           #           ]
 
1713
)
 
1714
[\040\t]*                    # Nab whitespace.
 
1715
(?:
 
1716
\(                              #  (
 
1717
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1718
(?:                                 #       (
 
1719
(?:  \\ [^\x80-\xff]  |
 
1720
\(                            #  (
 
1721
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1722
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1723
\)                           #                       )
 
1724
)    #         special
 
1725
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1726
)*                                  #            )*
 
1727
\)                             #                )
 
1728
[\040\t]* )*    # If comment found, allow more spaces.
 
1729
# optional trailing comments
 
1730
)*
 
1731
#       address spec
 
1732
>                    #                 >
 
1733
# name and address
 
1734
)
 
1735
/x
 
1736
    Alan Other <user\@dom.ain>
 
1737
 0: Alan Other <user@dom.ain>
 
1738
    <user\@dom.ain>
 
1739
 0: user@dom.ain
 
1740
    user\@dom.ain
 
1741
 0: user@dom.ain
 
1742
    \"A. Other\" <user.1234\@dom.ain> (a comment)
 
1743
 0: "A. Other" <user.1234@dom.ain>
 
1744
    A. Other <user.1234\@dom.ain> (a comment)
 
1745
 0:  Other <user.1234@dom.ain>
 
1746
    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
 
1747
 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
 
1748
    A missing angle <user\@some.where
 
1749
 0: user@some.where
 
1750
    *** Failers
 
1751
No match
 
1752
    The quick brown fox
 
1753
No match
 
1754
 
 
1755
/abc\0def\00pqr\000xyz\0000AB/
 
1756
    abc\0def\00pqr\000xyz\0000AB
 
1757
 0: abc\x00def\x00pqr\x00xyz\x000AB
 
1758
    abc456 abc\0def\00pqr\000xyz\0000ABCDE
 
1759
 0: abc\x00def\x00pqr\x00xyz\x000AB
 
1760
 
 
1761
/abc\x0def\x00pqr\x000xyz\x0000AB/
 
1762
    abc\x0def\x00pqr\x000xyz\x0000AB
 
1763
 0: abc\x0def\x00pqr\x000xyz\x0000AB
 
1764
    abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
 
1765
 0: abc\x0def\x00pqr\x000xyz\x0000AB
 
1766
 
 
1767
/^[\000-\037]/
 
1768
    \0A
 
1769
 0: \x00
 
1770
    \01B
 
1771
 0: \x01
 
1772
    \037C
 
1773
 0: \x1f
 
1774
 
 
1775
/\0*/
 
1776
    \0\0\0\0
 
1777
 0: \x00\x00\x00\x00
 
1778
 
 
1779
/A\x0{2,3}Z/
 
1780
    The A\x0\x0Z
 
1781
 0: A\x00\x00Z
 
1782
    An A\0\x0\0Z
 
1783
 0: A\x00\x00\x00Z
 
1784
    *** Failers
 
1785
No match
 
1786
    A\0Z
 
1787
No match
 
1788
    A\0\x0\0\x0Z
 
1789
No match
 
1790
 
 
1791
/^(cow|)\1(bell)/
 
1792
    cowcowbell
 
1793
 0: cowcowbell
 
1794
 1: cow
 
1795
 2: bell
 
1796
    bell
 
1797
 0: bell
 
1798
 1: 
 
1799
 2: bell
 
1800
    *** Failers
 
1801
No match
 
1802
    cowbell
 
1803
No match
 
1804
 
 
1805
/^\s/
 
1806
    \040abc
 
1807
 0:  
 
1808
    \x0cabc
 
1809
 0: \x0c
 
1810
    \nabc
 
1811
 0: \x0a
 
1812
    \rabc
 
1813
 0: \x0d
 
1814
    \tabc
 
1815
 0: \x09
 
1816
    *** Failers
 
1817
No match
 
1818
    abc
 
1819
No match
 
1820
 
 
1821
/^a     b
 
1822
  
0
1823
    c/x
 
1824
    abc
 
1825
 0: abc
 
1826
 
 
1827
/^(a|)\1*b/
 
1828
    ab
 
1829
 0: ab
 
1830
 1: a
 
1831
    aaaab
 
1832
 0: aaaab
 
1833
 1: a
 
1834
    b
 
1835
 0: b
 
1836
 1: 
 
1837
    *** Failers
 
1838
No match
 
1839
    acb
 
1840
No match
 
1841
 
 
1842
/^(a|)\1+b/
 
1843
    aab
 
1844
 0: aab
 
1845
 1: a
 
1846
    aaaab
 
1847
 0: aaaab
 
1848
 1: a
 
1849
    b
 
1850
 0: b
 
1851
 1: 
 
1852
    *** Failers
 
1853
No match
 
1854
    ab
 
1855
No match
 
1856
 
 
1857
/^(a|)\1?b/
 
1858
    ab
 
1859
 0: ab
 
1860
 1: a
 
1861
    aab
 
1862
 0: aab
 
1863
 1: a
 
1864
    b
 
1865
 0: b
 
1866
 1: 
 
1867
    *** Failers
 
1868
No match
 
1869
    acb
 
1870
No match
 
1871
 
 
1872
/^(a|)\1{2}b/
 
1873
    aaab
 
1874
 0: aaab
 
1875
 1: a
 
1876
    b
 
1877
 0: b
 
1878
 1: 
 
1879
    *** Failers
 
1880
No match
 
1881
    ab
 
1882
No match
 
1883
    aab
 
1884
No match
 
1885
    aaaab
 
1886
No match
 
1887
 
 
1888
/^(a|)\1{2,3}b/
 
1889
    aaab
 
1890
 0: aaab
 
1891
 1: a
 
1892
    aaaab
 
1893
 0: aaaab
 
1894
 1: a
 
1895
    b
 
1896
 0: b
 
1897
 1: 
 
1898
    *** Failers
 
1899
No match
 
1900
    ab
 
1901
No match
 
1902
    aab
 
1903
No match
 
1904
    aaaaab
 
1905
No match
 
1906
 
 
1907
/ab{1,3}bc/
 
1908
    abbbbc
 
1909
 0: abbbbc
 
1910
    abbbc
 
1911
 0: abbbc
 
1912
    abbc
 
1913
 0: abbc
 
1914
    *** Failers
 
1915
No match
 
1916
    abc
 
1917
No match
 
1918
    abbbbbc
 
1919
No match
 
1920
 
 
1921
/([^.]*)\.([^:]*):[T ]+(.*)/
 
1922
    track1.title:TBlah blah blah
 
1923
 0: track1.title:TBlah blah blah
 
1924
 1: track1
 
1925
 2: title
 
1926
 3: Blah blah blah
 
1927
 
 
1928
/([^.]*)\.([^:]*):[T ]+(.*)/i
 
1929
    track1.title:TBlah blah blah
 
1930
 0: track1.title:TBlah blah blah
 
1931
 1: track1
 
1932
 2: title
 
1933
 3: Blah blah blah
 
1934
 
 
1935
/([^.]*)\.([^:]*):[t ]+(.*)/i
 
1936
    track1.title:TBlah blah blah
 
1937
 0: track1.title:TBlah blah blah
 
1938
 1: track1
 
1939
 2: title
 
1940
 3: Blah blah blah
 
1941
 
 
1942
/^[W-c]+$/
 
1943
    WXY_^abc
 
1944
 0: WXY_^abc
 
1945
    *** Failers
 
1946
No match
 
1947
    wxy
 
1948
No match
 
1949
 
 
1950
/^[W-c]+$/i
 
1951
    WXY_^abc
 
1952
 0: WXY_^abc
 
1953
    wxy_^ABC
 
1954
 0: wxy_^ABC
 
1955
 
 
1956
/^[\x3f-\x5F]+$/i
 
1957
    WXY_^abc
 
1958
 0: WXY_^abc
 
1959
    wxy_^ABC
 
1960
 0: wxy_^ABC
 
1961
 
 
1962
/^abc$/m
 
1963
    abc
 
1964
 0: abc
 
1965
    qqq\nabc
 
1966
 0: abc
 
1967
    abc\nzzz
 
1968
 0: abc
 
1969
    qqq\nabc\nzzz
 
1970
 0: abc
 
1971
 
 
1972
/^abc$/
 
1973
    abc
 
1974
 0: abc
 
1975
    *** Failers
 
1976
No match
 
1977
    qqq\nabc
 
1978
No match
 
1979
    abc\nzzz
 
1980
No match
 
1981
    qqq\nabc\nzzz
 
1982
No match
 
1983
 
 
1984
/\Aabc\Z/m
 
1985
    abc
 
1986
 0: abc
 
1987
    abc\n 
 
1988
 0: abc
 
1989
    *** Failers
 
1990
No match
 
1991
    qqq\nabc
 
1992
No match
 
1993
    abc\nzzz
 
1994
No match
 
1995
    qqq\nabc\nzzz
 
1996
No match
 
1997
    
 
1998
/\A(.)*\Z/s
 
1999
    abc\ndef
 
2000
 0: abc\x0adef
 
2001
 1: f
 
2002
 
 
2003
/\A(.)*\Z/m
 
2004
    *** Failers
 
2005
 0: *** Failers
 
2006
 1: s
 
2007
    abc\ndef
 
2008
No match
 
2009
 
 
2010
/(?:b)|(?::+)/
 
2011
    b::c
 
2012
 0: b
 
2013
    c::b
 
2014
 0: ::
 
2015
 
 
2016
/[-az]+/
 
2017
    az-
 
2018
 0: az-
 
2019
    *** Failers
 
2020
 0: a
 
2021
    b
 
2022
No match
 
2023
 
 
2024
/[az-]+/
 
2025
    za-
 
2026
 0: za-
 
2027
    *** Failers
 
2028
 0: a
 
2029
    b
 
2030
No match
 
2031
 
 
2032
/[a\-z]+/
 
2033
    a-z
 
2034
 0: a-z
 
2035
    *** Failers
 
2036
 0: a
 
2037
    b
 
2038
No match
 
2039
 
 
2040
/[a-z]+/
 
2041
    abcdxyz
 
2042
 0: abcdxyz
 
2043
 
 
2044
/[\d-]+/
 
2045
    12-34
 
2046
 0: 12-34
 
2047
    *** Failers
 
2048
No match
 
2049
    aaa
 
2050
No match
 
2051
 
 
2052
/[\d-z]+/
 
2053
    12-34z
 
2054
 0: 12-34z
 
2055
    *** Failers
 
2056
No match
 
2057
    aaa
 
2058
No match
 
2059
 
 
2060
/\x5c/
 
2061
    \\
 
2062
 0: \
 
2063
 
 
2064
/\x20Z/
 
2065
    the Zoo
 
2066
 0:  Z
 
2067
    *** Failers
 
2068
No match
 
2069
    Zulu
 
2070
No match
 
2071
 
 
2072
/(abc)\1/i
 
2073
    abcabc
 
2074
 0: abcabc
 
2075
 1: abc
 
2076
    ABCabc
 
2077
 0: ABCabc
 
2078
 1: ABC
 
2079
    abcABC
 
2080
 0: abcABC
 
2081
 1: abc
 
2082
 
 
2083
/ab{3cd/
 
2084
    ab{3cd
 
2085
 0: ab{3cd
 
2086
 
 
2087
/ab{3,cd/
 
2088
    ab{3,cd
 
2089
 0: ab{3,cd
 
2090
 
 
2091
/ab{3,4a}cd/
 
2092
    ab{3,4a}cd
 
2093
 0: ab{3,4a}cd
 
2094
 
 
2095
/{4,5a}bc/
 
2096
    {4,5a}bc
 
2097
 0: {4,5a}bc
 
2098
 
 
2099
/^a.b/
 
2100
    a\rb
 
2101
 0: a\x0db
 
2102
    *** Failers
 
2103
No match
 
2104
    a\nb
 
2105
No match
 
2106
 
 
2107
/abc$/
 
2108
    abc
 
2109
 0: abc
 
2110
    abc\n
 
2111
 0: abc
 
2112
    *** Failers
 
2113
No match
 
2114
    abc\ndef
 
2115
No match
 
2116
 
 
2117
/(abc)\123/
 
2118
    abc\x53
 
2119
 0: abcS
 
2120
 1: abc
 
2121
 
 
2122
/(abc)\223/
 
2123
    abc\x93
 
2124
 0: abc\x93
 
2125
 1: abc
 
2126
 
 
2127
/(abc)\323/
 
2128
    abc\xd3
 
2129
 0: abc\xd3
 
2130
 1: abc
 
2131
 
 
2132
/(abc)\500/
 
2133
    abc\x40
 
2134
 0: abc@
 
2135
 1: abc
 
2136
    abc\100
 
2137
 0: abc@
 
2138
 1: abc
 
2139
 
 
2140
/(abc)\5000/
 
2141
    abc\x400
 
2142
 0: abc@0
 
2143
 1: abc
 
2144
    abc\x40\x30
 
2145
 0: abc@0
 
2146
 1: abc
 
2147
    abc\1000
 
2148
 0: abc@0
 
2149
 1: abc
 
2150
    abc\100\x30
 
2151
 0: abc@0
 
2152
 1: abc
 
2153
    abc\100\060
 
2154
 0: abc@0
 
2155
 1: abc
 
2156
    abc\100\60
 
2157
 0: abc@0
 
2158
 1: abc
 
2159
 
 
2160
/abc\81/
 
2161
    abc\081
 
2162
 0: abc\x0081
 
2163
    abc\0\x38\x31
 
2164
 0: abc\x0081
 
2165
 
 
2166
/abc\91/
 
2167
    abc\091
 
2168
 0: abc\x0091
 
2169
    abc\0\x39\x31
 
2170
 0: abc\x0091
 
2171
 
 
2172
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
 
2173
    abcdefghijkllS
 
2174
 0: abcdefghijkllS
 
2175
 1: a
 
2176
 2: b
 
2177
 3: c
 
2178
 4: d
 
2179
 5: e
 
2180
 6: f
 
2181
 7: g
 
2182
 8: h
 
2183
 9: i
 
2184
10: j
 
2185
11: k
 
2186
12: l
 
2187
 
 
2188
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
 
2189
    abcdefghijk\12S
 
2190
 0: abcdefghijk\x0aS
 
2191
 1: a
 
2192
 2: b
 
2193
 3: c
 
2194
 4: d
 
2195
 5: e
 
2196
 6: f
 
2197
 7: g
 
2198
 8: h
 
2199
 9: i
 
2200
10: j
 
2201
11: k
 
2202
 
 
2203
/ab\gdef/
 
2204
    abgdef
 
2205
 0: abgdef
 
2206
 
 
2207
/a{0}bc/
 
2208
    bc
 
2209
 0: bc
 
2210
 
 
2211
/(a|(bc)){0,0}?xyz/
 
2212
    xyz
 
2213
 0: xyz
 
2214
 
 
2215
/abc[\10]de/
 
2216
    abc\010de
 
2217
 0: abc\x08de
 
2218
 
 
2219
/abc[\1]de/
 
2220
    abc\1de
 
2221
 0: abc\x01de
 
2222
 
 
2223
/(abc)[\1]de/
 
2224
    abc\1de
 
2225
 0: abc\x01de
 
2226
 1: abc
 
2227
 
 
2228
/(?s)a.b/
 
2229
    a\nb
 
2230
 0: a\x0ab
 
2231
 
 
2232
/^([^a])([^\b])([^c]*)([^d]{3,4})/
 
2233
    baNOTccccd
 
2234
 0: baNOTcccc
 
2235
 1: b
 
2236
 2: a
 
2237
 3: NOT
 
2238
 4: cccc
 
2239
    baNOTcccd
 
2240
 0: baNOTccc
 
2241
 1: b
 
2242
 2: a
 
2243
 3: NOT
 
2244
 4: ccc
 
2245
    baNOTccd
 
2246
 0: baNOTcc
 
2247
 1: b
 
2248
 2: a
 
2249
 3: NO
 
2250
 4: Tcc
 
2251
    bacccd
 
2252
 0: baccc
 
2253
 1: b
 
2254
 2: a
 
2255
 3: 
 
2256
 4: ccc
 
2257
    *** Failers
 
2258
 0: *** Failers
 
2259
 1: *
 
2260
 2: *
 
2261
 3: * Fail
 
2262
 4: ers
 
2263
    anything
 
2264
No match
 
2265
    b\bc   
 
2266
No match
 
2267
    baccd
 
2268
No match
 
2269
 
 
2270
/[^a]/
 
2271
    Abc
 
2272
 0: A
 
2273
  
 
2274
/[^a]/i
 
2275
    Abc 
 
2276
 0: b
 
2277
 
 
2278
/[^a]+/
 
2279
    AAAaAbc
 
2280
 0: AAA
 
2281
  
 
2282
/[^a]+/i
 
2283
    AAAaAbc 
 
2284
 0: bc
 
2285
 
 
2286
/[^a]+/
 
2287
    bbb\nccc
 
2288
 0: bbb\x0accc
 
2289
   
 
2290
/[^k]$/
 
2291
    abc
 
2292
 0: c
 
2293
    *** Failers
 
2294
 0: s
 
2295
    abk   
 
2296
No match
 
2297
   
 
2298
/[^k]{2,3}$/
 
2299
    abc
 
2300
 0: abc
 
2301
    kbc
 
2302
 0: bc
 
2303
    kabc 
 
2304
 0: abc
 
2305
    *** Failers
 
2306
 0: ers
 
2307
    abk
 
2308
No match
 
2309
    akb
 
2310
No match
 
2311
    akk 
 
2312
No match
 
2313
 
 
2314
/^\d{8,}\@.+[^k]$/
 
2315
    12345678\@a.b.c.d
 
2316
 0: 12345678@a.b.c.d
 
2317
    123456789\@x.y.z
 
2318
 0: 123456789@x.y.z
 
2319
    *** Failers
 
2320
No match
 
2321
    12345678\@x.y.uk
 
2322
No match
 
2323
    1234567\@a.b.c.d       
 
2324
No match
 
2325
 
 
2326
/(a)\1{8,}/
 
2327
    aaaaaaaaa
 
2328
 0: aaaaaaaaa
 
2329
 1: a
 
2330
    aaaaaaaaaa
 
2331
 0: aaaaaaaaaa
 
2332
 1: a
 
2333
    *** Failers
 
2334
No match
 
2335
    aaaaaaa   
 
2336
No match
 
2337
 
 
2338
/[^a]/
 
2339
    aaaabcd
 
2340
 0: b
 
2341
    aaAabcd 
 
2342
 0: A
 
2343
 
 
2344
/[^a]/i
 
2345
    aaaabcd
 
2346
 0: b
 
2347
    aaAabcd 
 
2348
 0: b
 
2349
 
 
2350
/[^az]/
 
2351
    aaaabcd
 
2352
 0: b
 
2353
    aaAabcd 
 
2354
 0: A
 
2355
 
 
2356
/[^az]/i
 
2357
    aaaabcd
 
2358
 0: b
 
2359
    aaAabcd 
 
2360
 0: b
 
2361
 
 
2362
/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
 
2363
 \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
 
2364
 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
 
2365
 
 
2366
/P[^*]TAIRE[^*]{1,6}?LL/
 
2367
    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
 
2368
 0: PSTAIREISLL
 
2369
 
 
2370
/P[^*]TAIRE[^*]{1,}?LL/
 
2371
    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
 
2372
 0: PSTAIREISLL
 
2373
 
 
2374
/(\.\d\d[1-9]?)\d+/
 
2375
    1.230003938
 
2376
 0: .230003938
 
2377
 1: .23
 
2378
    1.875000282   
 
2379
 0: .875000282
 
2380
 1: .875
 
2381
    1.235  
 
2382
 0: .235
 
2383
 1: .23
 
2384
                  
 
2385
/(\.\d\d((?=0)|\d(?=\d)))/
 
2386
    1.230003938      
 
2387
 0: .23
 
2388
 1: .23
 
2389
 2: 
 
2390
    1.875000282
 
2391
 0: .875
 
2392
 1: .875
 
2393
 2: 5
 
2394
    *** Failers 
 
2395
No match
 
2396
    1.235 
 
2397
No match
 
2398
    
 
2399
/a(?)b/
 
2400
    ab 
 
2401
 0: ab
 
2402
 
 
2403
/\b(foo)\s+(\w+)/i
 
2404
    Food is on the foo table
 
2405
 0: foo table
 
2406
 1: foo
 
2407
 2: table
 
2408
    
 
2409
/foo(.*)bar/
 
2410
    The food is under the bar in the barn.
 
2411
 0: food is under the bar in the bar
 
2412
 1: d is under the bar in the 
 
2413
    
 
2414
/foo(.*?)bar/  
 
2415
    The food is under the bar in the barn.
 
2416
 0: food is under the bar
 
2417
 1: d is under the 
 
2418
 
 
2419
/(.*)(\d*)/
 
2420
    I have 2 numbers: 53147
 
2421
 0: I have 2 numbers: 53147
 
2422
 1: I have 2 numbers: 53147
 
2423
 2: 
 
2424
    
 
2425
/(.*)(\d+)/
 
2426
    I have 2 numbers: 53147
 
2427
 0: I have 2 numbers: 53147
 
2428
 1: I have 2 numbers: 5314
 
2429
 2: 7
 
2430
 
 
2431
/(.*?)(\d*)/
 
2432
    I have 2 numbers: 53147
 
2433
 0: 
 
2434
 1: 
 
2435
 2: 
 
2436
 
 
2437
/(.*?)(\d+)/
 
2438
    I have 2 numbers: 53147
 
2439
 0: I have 2
 
2440
 1: I have 
 
2441
 2: 2
 
2442
 
 
2443
/(.*)(\d+)$/
 
2444
    I have 2 numbers: 53147
 
2445
 0: I have 2 numbers: 53147
 
2446
 1: I have 2 numbers: 5314
 
2447
 2: 7
 
2448
 
 
2449
/(.*?)(\d+)$/
 
2450
    I have 2 numbers: 53147
 
2451
 0: I have 2 numbers: 53147
 
2452
 1: I have 2 numbers: 
 
2453
 2: 53147
 
2454
 
 
2455
/(.*)\b(\d+)$/
 
2456
    I have 2 numbers: 53147
 
2457
 0: I have 2 numbers: 53147
 
2458
 1: I have 2 numbers: 
 
2459
 2: 53147
 
2460
 
 
2461
/(.*\D)(\d+)$/
 
2462
    I have 2 numbers: 53147
 
2463
 0: I have 2 numbers: 53147
 
2464
 1: I have 2 numbers: 
 
2465
 2: 53147
 
2466
 
 
2467
/^\D*(?!123)/
 
2468
    ABC123
 
2469
 0: AB
 
2470
     
 
2471
/^(\D*)(?=\d)(?!123)/
 
2472
    ABC445
 
2473
 0: ABC
 
2474
 1: ABC
 
2475
    *** Failers
 
2476
No match
 
2477
    ABC123
 
2478
No match
 
2479
    
 
2480
/^[W-]46]/
 
2481
    W46]789 
 
2482
 0: W46]
 
2483
    -46]789
 
2484
 0: -46]
 
2485
    *** Failers
 
2486
No match
 
2487
    Wall
 
2488
No match
 
2489
    Zebra
 
2490
No match
 
2491
    42
 
2492
No match
 
2493
    [abcd] 
 
2494
No match
 
2495
    ]abcd[
 
2496
No match
 
2497
       
 
2498
/^[W-\]46]/
 
2499
    W46]789 
 
2500
 0: W
 
2501
    Wall
 
2502
 0: W
 
2503
    Zebra
 
2504
 0: Z
 
2505
    Xylophone  
 
2506
 0: X
 
2507
    42
 
2508
 0: 4
 
2509
    [abcd] 
 
2510
 0: [
 
2511
    ]abcd[
 
2512
 0: ]
 
2513
    \\backslash 
 
2514
 0: \
 
2515
    *** Failers
 
2516
No match
 
2517
    -46]789
 
2518
No match
 
2519
    well
 
2520
No match
 
2521
    
 
2522
/\d\d\/\d\d\/\d\d\d\d/
 
2523
    01/01/2000
 
2524
 0: 01/01/2000
 
2525
 
 
2526
/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
 
2527
  word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
2528
 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
2529
  word cat dog elephant mussel cow horse canary baboon snake shark
 
2530
No match
 
2531
 
 
2532
/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
 
2533
  word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
 
2534
No match
 
2535
 
 
2536
/^(a){0,0}/
 
2537
    bcd
 
2538
 0: 
 
2539
    abc
 
2540
 0: 
 
2541
    aab     
 
2542
 0: 
 
2543
 
 
2544
/^(a){0,1}/
 
2545
    bcd
 
2546
 0: 
 
2547
    abc
 
2548
 0: a
 
2549
 1: a
 
2550
    aab  
 
2551
 0: a
 
2552
 1: a
 
2553
 
 
2554
/^(a){0,2}/
 
2555
    bcd
 
2556
 0: 
 
2557
    abc
 
2558
 0: a
 
2559
 1: a
 
2560
    aab  
 
2561
 0: aa
 
2562
 1: a
 
2563
 
 
2564
/^(a){0,3}/
 
2565
    bcd
 
2566
 0: 
 
2567
    abc
 
2568
 0: a
 
2569
 1: a
 
2570
    aab
 
2571
 0: aa
 
2572
 1: a
 
2573
    aaa   
 
2574
 0: aaa
 
2575
 1: a
 
2576
 
 
2577
/^(a){0,}/
 
2578
    bcd
 
2579
 0: 
 
2580
    abc
 
2581
 0: a
 
2582
 1: a
 
2583
    aab
 
2584
 0: aa
 
2585
 1: a
 
2586
    aaa
 
2587
 0: aaa
 
2588
 1: a
 
2589
    aaaaaaaa    
 
2590
 0: aaaaaaaa
 
2591
 1: a
 
2592
 
 
2593
/^(a){1,1}/
 
2594
    bcd
 
2595
No match
 
2596
    abc
 
2597
 0: a
 
2598
 1: a
 
2599
    aab  
 
2600
 0: a
 
2601
 1: a
 
2602
 
 
2603
/^(a){1,2}/
 
2604
    bcd
 
2605
No match
 
2606
    abc
 
2607
 0: a
 
2608
 1: a
 
2609
    aab  
 
2610
 0: aa
 
2611
 1: a
 
2612
 
 
2613
/^(a){1,3}/
 
2614
    bcd
 
2615
No match
 
2616
    abc
 
2617
 0: a
 
2618
 1: a
 
2619
    aab
 
2620
 0: aa
 
2621
 1: a
 
2622
    aaa   
 
2623
 0: aaa
 
2624
 1: a
 
2625
 
 
2626
/^(a){1,}/
 
2627
    bcd
 
2628
No match
 
2629
    abc
 
2630
 0: a
 
2631
 1: a
 
2632
    aab
 
2633
 0: aa
 
2634
 1: a
 
2635
    aaa
 
2636
 0: aaa
 
2637
 1: a
 
2638
    aaaaaaaa    
 
2639
 0: aaaaaaaa
 
2640
 1: a
 
2641
 
 
2642
/.*\.gif/
 
2643
    borfle\nbib.gif\nno
 
2644
 0: bib.gif
 
2645
 
 
2646
/.{0,}\.gif/
 
2647
    borfle\nbib.gif\nno
 
2648
 0: bib.gif
 
2649
 
 
2650
/.*\.gif/m
 
2651
    borfle\nbib.gif\nno
 
2652
 0: bib.gif
 
2653
 
 
2654
/.*\.gif/s
 
2655
    borfle\nbib.gif\nno
 
2656
 0: borfle\x0abib.gif
 
2657
 
 
2658
/.*\.gif/ms
 
2659
    borfle\nbib.gif\nno
 
2660
 0: borfle\x0abib.gif
 
2661
    
 
2662
/.*$/
 
2663
    borfle\nbib.gif\nno
 
2664
 0: no
 
2665
 
 
2666
/.*$/m
 
2667
    borfle\nbib.gif\nno
 
2668
 0: borfle
 
2669
 
 
2670
/.*$/s
 
2671
    borfle\nbib.gif\nno
 
2672
 0: borfle\x0abib.gif\x0ano
 
2673
 
 
2674
/.*$/ms
 
2675
    borfle\nbib.gif\nno
 
2676
 0: borfle\x0abib.gif\x0ano
 
2677
    
 
2678
/.*$/
 
2679
    borfle\nbib.gif\nno\n
 
2680
 0: no
 
2681
 
 
2682
/.*$/m
 
2683
    borfle\nbib.gif\nno\n
 
2684
 0: borfle
 
2685
 
 
2686
/.*$/s
 
2687
    borfle\nbib.gif\nno\n
 
2688
 0: borfle\x0abib.gif\x0ano\x0a
 
2689
 
 
2690
/.*$/ms
 
2691
    borfle\nbib.gif\nno\n
 
2692
 0: borfle\x0abib.gif\x0ano\x0a
 
2693
    
 
2694
/(.*X|^B)/
 
2695
    abcde\n1234Xyz
 
2696
 0: 1234X
 
2697
 1: 1234X
 
2698
    BarFoo 
 
2699
 0: B
 
2700
 1: B
 
2701
    *** Failers
 
2702
No match
 
2703
    abcde\nBar  
 
2704
No match
 
2705
 
 
2706
/(.*X|^B)/m
 
2707
    abcde\n1234Xyz
 
2708
 0: 1234X
 
2709
 1: 1234X
 
2710
    BarFoo 
 
2711
 0: B
 
2712
 1: B
 
2713
    abcde\nBar  
 
2714
 0: B
 
2715
 1: B
 
2716
 
 
2717
/(.*X|^B)/s
 
2718
    abcde\n1234Xyz
 
2719
 0: abcde\x0a1234X
 
2720
 1: abcde\x0a1234X
 
2721
    BarFoo 
 
2722
 0: B
 
2723
 1: B
 
2724
    *** Failers
 
2725
No match
 
2726
    abcde\nBar  
 
2727
No match
 
2728
 
 
2729
/(.*X|^B)/ms
 
2730
    abcde\n1234Xyz
 
2731
 0: abcde\x0a1234X
 
2732
 1: abcde\x0a1234X
 
2733
    BarFoo 
 
2734
 0: B
 
2735
 1: B
 
2736
    abcde\nBar  
 
2737
 0: B
 
2738
 1: B
 
2739
 
 
2740
/(?s)(.*X|^B)/
 
2741
    abcde\n1234Xyz
 
2742
 0: abcde\x0a1234X
 
2743
 1: abcde\x0a1234X
 
2744
    BarFoo 
 
2745
 0: B
 
2746
 1: B
 
2747
    *** Failers 
 
2748
No match
 
2749
    abcde\nBar  
 
2750
No match
 
2751
 
 
2752
/(?s:.*X|^B)/
 
2753
    abcde\n1234Xyz
 
2754
 0: abcde\x0a1234X
 
2755
    BarFoo 
 
2756
 0: B
 
2757
    *** Failers 
 
2758
No match
 
2759
    abcde\nBar  
 
2760
No match
 
2761
 
 
2762
/^.*B/
 
2763
    **** Failers
 
2764
No match
 
2765
    abc\nB
 
2766
No match
 
2767
     
 
2768
/(?s)^.*B/
 
2769
    abc\nB
 
2770
 0: abc\x0aB
 
2771
 
 
2772
/(?m)^.*B/
 
2773
    abc\nB
 
2774
 0: B
 
2775
     
 
2776
/(?ms)^.*B/
 
2777
    abc\nB
 
2778
 0: abc\x0aB
 
2779
 
 
2780
/(?ms)^B/
 
2781
    abc\nB
 
2782
 0: B
 
2783
 
 
2784
/(?s)B$/
 
2785
    B\n
 
2786
 0: B
 
2787
 
 
2788
/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
 
2789
    123456654321
 
2790
 0: 123456654321
 
2791
  
 
2792
/^\d\d\d\d\d\d\d\d\d\d\d\d/
 
2793
    123456654321 
 
2794
 0: 123456654321
 
2795
 
 
2796
/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
 
2797
    123456654321
 
2798
 0: 123456654321
 
2799
  
 
2800
/^[abc]{12}/
 
2801
    abcabcabcabc
 
2802
 0: abcabcabcabc
 
2803
    
 
2804
/^[a-c]{12}/
 
2805
    abcabcabcabc
 
2806
 0: abcabcabcabc
 
2807
    
 
2808
/^(a|b|c){12}/
 
2809
    abcabcabcabc 
 
2810
 0: abcabcabcabc
 
2811
 1: c
 
2812
 
 
2813
/^[abcdefghijklmnopqrstuvwxy0123456789]/
 
2814
    n
 
2815
 0: n
 
2816
    *** Failers 
 
2817
No match
 
2818
    z 
 
2819
No match
 
2820
 
 
2821
/abcde{0,0}/
 
2822
    abcd
 
2823
 0: abcd
 
2824
    *** Failers
 
2825
No match
 
2826
    abce  
 
2827
No match
 
2828
 
 
2829
/ab[cd]{0,0}e/
 
2830
    abe
 
2831
 0: abe
 
2832
    *** Failers
 
2833
No match
 
2834
    abcde 
 
2835
No match
 
2836
    
 
2837
/ab(c){0,0}d/
 
2838
    abd
 
2839
 0: abd
 
2840
    *** Failers
 
2841
No match
 
2842
    abcd   
 
2843
No match
 
2844
 
 
2845
/a(b*)/
 
2846
    a
 
2847
 0: a
 
2848
 1: 
 
2849
    ab
 
2850
 0: ab
 
2851
 1: b
 
2852
    abbbb
 
2853
 0: abbbb
 
2854
 1: bbbb
 
2855
    *** Failers
 
2856
 0: a
 
2857
 1: 
 
2858
    bbbbb    
 
2859
No match
 
2860
    
 
2861
/ab\d{0}e/
 
2862
    abe
 
2863
 0: abe
 
2864
    *** Failers
 
2865
No match
 
2866
    ab1e   
 
2867
No match
 
2868
    
 
2869
/"([^\\"]+|\\.)*"/
 
2870
    the \"quick\" brown fox
 
2871
 0: "quick"
 
2872
 1: quick
 
2873
    \"the \\\"quick\\\" brown fox\" 
 
2874
 0: "the \"quick\" brown fox"
 
2875
 1:  brown fox
 
2876
 
 
2877
/.*?/g+
 
2878
    abc
 
2879
 0: 
 
2880
 0+ abc
 
2881
 0: a
 
2882
 0+ bc
 
2883
 0: 
 
2884
 0+ bc
 
2885
 0: b
 
2886
 0+ c
 
2887
 0: 
 
2888
 0+ c
 
2889
 0: c
 
2890
 0+ 
 
2891
 0: 
 
2892
 0+ 
 
2893
  
 
2894
/\b/g+
 
2895
    abc 
 
2896
 0: 
 
2897
 0+ abc
 
2898
 0: 
 
2899
 0+ 
 
2900
 
 
2901
/\b/+g
 
2902
    abc 
 
2903
 0: 
 
2904
 0+ abc
 
2905
 0: 
 
2906
 0+ 
 
2907
 
 
2908
//g
 
2909
    abc
 
2910
 0: 
 
2911
 0: 
 
2912
 0: 
 
2913
 0: 
 
2914
 
 
2915
/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
 
2916
  <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
 
2917
 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
 
2918
 1:  BGCOLOR='#DBE9E9'
 
2919
 2:  align=left valign=top
 
2920
 3: 43.
 
2921
 4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)
 
2922
 5: 
 
2923
 6: 
 
2924
 7: <unset>
 
2925
 8:  align=left valign=top
 
2926
 9: Lega lstaff.com
 
2927
10:  align=left valign=top
 
2928
11: CA - Statewide
 
2929
 
 
2930
/a[^a]b/
 
2931
    acb
 
2932
 0: acb
 
2933
    a\nb
 
2934
 0: a\x0ab
 
2935
    
 
2936
/a.b/
 
2937
    acb
 
2938
 0: acb
 
2939
    *** Failers 
 
2940
No match
 
2941
    a\nb   
 
2942
No match
 
2943
    
 
2944
/a[^a]b/s
 
2945
    acb
 
2946
 0: acb
 
2947
    a\nb  
 
2948
 0: a\x0ab
 
2949
    
 
2950
/a.b/s
 
2951
    acb
 
2952
 0: acb
 
2953
    a\nb  
 
2954
 0: a\x0ab
 
2955
 
 
2956
/^(b+?|a){1,2}?c/
 
2957
    bac
 
2958
 0: bac
 
2959
 1: a
 
2960
    bbac
 
2961
 0: bbac
 
2962
 1: a
 
2963
    bbbac
 
2964
 0: bbbac
 
2965
 1: a
 
2966
    bbbbac
 
2967
 0: bbbbac
 
2968
 1: a
 
2969
    bbbbbac 
 
2970
 0: bbbbbac
 
2971
 1: a
 
2972
 
 
2973
/^(b+|a){1,2}?c/
 
2974
    bac
 
2975
 0: bac
 
2976
 1: a
 
2977
    bbac
 
2978
 0: bbac
 
2979
 1: a
 
2980
    bbbac
 
2981
 0: bbbac
 
2982
 1: a
 
2983
    bbbbac
 
2984
 0: bbbbac
 
2985
 1: a
 
2986
    bbbbbac 
 
2987
 0: bbbbbac
 
2988
 1: a
 
2989
    
 
2990
/(?!\A)x/m
 
2991
    x\nb\n
 
2992
No match
 
2993
    a\bx\n  
 
2994
 0: x
 
2995
    
 
2996
/\x0{ab}/
 
2997
    \0{ab} 
 
2998
 0: \x00{ab}
 
2999
 
 
3000
/(A|B)*?CD/
 
3001
    CD 
 
3002
 0: CD
 
3003
    
 
3004
/(A|B)*CD/
 
3005
    CD 
 
3006
 0: CD
 
3007
 
 
3008
/(AB)*?\1/
 
3009
    ABABAB
 
3010
 0: ABAB
 
3011
 1: AB
 
3012
 
 
3013
/(AB)*\1/
 
3014
    ABABAB
 
3015
 0: ABABAB
 
3016
 1: AB
 
3017
    
 
3018
/(?<!bar)foo/
 
3019
    foo
 
3020
 0: foo
 
3021
    catfood
 
3022
 0: foo
 
3023
    arfootle
 
3024
 0: foo
 
3025
    rfoosh
 
3026
 0: foo
 
3027
    *** Failers
 
3028
No match
 
3029
    barfoo
 
3030
No match
 
3031
    towbarfoo
 
3032
No match
 
3033
 
 
3034
/\w{3}(?<!bar)foo/
 
3035
    catfood
 
3036
 0: catfoo
 
3037
    *** Failers
 
3038
No match
 
3039
    foo
 
3040
No match
 
3041
    barfoo
 
3042
No match
 
3043
    towbarfoo
 
3044
No match
 
3045
 
 
3046
/(?<=(foo)a)bar/
 
3047
    fooabar
 
3048
 0: bar
 
3049
 1: foo
 
3050
    *** Failers
 
3051
No match
 
3052
    bar
 
3053
No match
 
3054
    foobbar
 
3055
No match
 
3056
      
 
3057
/\Aabc\z/m
 
3058
    abc
 
3059
 0: abc
 
3060
    *** Failers
 
3061
No match
 
3062
    abc\n   
 
3063
No match
 
3064
    qqq\nabc
 
3065
No match
 
3066
    abc\nzzz
 
3067
No match
 
3068
    qqq\nabc\nzzz
 
3069
No match
 
3070
 
 
3071
"(?>.*/)foo"
 
3072
    /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
 
3073
No match
 
3074
 
 
3075
"(?>.*/)foo"
 
3076
    /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
 
3077
 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
 
3078
 
 
3079
/(?>(\.\d\d[1-9]?))\d+/
 
3080
    1.230003938
 
3081
 0: .230003938
 
3082
 1: .23
 
3083
    1.875000282
 
3084
 0: .875000282
 
3085
 1: .875
 
3086
    *** Failers 
 
3087
No match
 
3088
    1.235 
 
3089
No match
 
3090
 
 
3091
/^((?>\w+)|(?>\s+))*$/
 
3092
    now is the time for all good men to come to the aid of the party
 
3093
 0: now is the time for all good men to come to the aid of the party
 
3094
 1: party
 
3095
    *** Failers
 
3096
No match
 
3097
    this is not a line with only words and spaces!
 
3098
No match
 
3099
    
 
3100
/(\d+)(\w)/
 
3101
    12345a
 
3102
 0: 12345a
 
3103
 1: 12345
 
3104
 2: a
 
3105
    12345+ 
 
3106
 0: 12345
 
3107
 1: 1234
 
3108
 2: 5
 
3109
 
 
3110
/((?>\d+))(\w)/
 
3111
    12345a
 
3112
 0: 12345a
 
3113
 1: 12345
 
3114
 2: a
 
3115
    *** Failers
 
3116
No match
 
3117
    12345+ 
 
3118
No match
 
3119
 
 
3120
/(?>a+)b/
 
3121
    aaab
 
3122
 0: aaab
 
3123
 
 
3124
/((?>a+)b)/
 
3125
    aaab
 
3126
 0: aaab
 
3127
 1: aaab
 
3128
 
 
3129
/(?>(a+))b/
 
3130
    aaab
 
3131
 0: aaab
 
3132
 1: aaa
 
3133
 
 
3134
/(?>b)+/
 
3135
    aaabbbccc
 
3136
 0: bbb
 
3137
 
 
3138
/(?>a+|b+|c+)*c/
 
3139
    aaabbbbccccd
 
3140
 0: aaabbbbc
 
3141
 
 
3142
/((?>[^()]+)|\([^()]*\))+/
 
3143
    ((abc(ade)ufh()()x
 
3144
 0: abc(ade)ufh()()x
 
3145
 1: x
 
3146
    
 
3147
/\(((?>[^()]+)|\([^()]+\))+\)/ 
 
3148
    (abc)
 
3149
 0: (abc)
 
3150
 1: abc
 
3151
    (abc(def)xyz)
 
3152
 0: (abc(def)xyz)
 
3153
 1: xyz
 
3154
    *** Failers
 
3155
No match
 
3156
    ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   
 
3157
No match
 
3158
 
 
3159
/a(?-i)b/i
 
3160
    ab
 
3161
 0: ab
 
3162
    Ab
 
3163
 0: Ab
 
3164
    *** Failers 
 
3165
No match
 
3166
    aB
 
3167
No match
 
3168
    AB
 
3169
No match
 
3170
        
 
3171
/(a (?x)b c)d e/
 
3172
    a bcd e
 
3173
 0: a bcd e
 
3174
 1: a bc
 
3175
    *** Failers
 
3176
No match
 
3177
    a b cd e
 
3178
No match
 
3179
    abcd e   
 
3180
No match
 
3181
    a bcde 
 
3182
No match
 
3183
 
 
3184
/(a b(?x)c d (?-x)e f)/
 
3185
    a bcde f
 
3186
 0: a bcde f
 
3187
 1: a bcde f
 
3188
    *** Failers
 
3189
No match
 
3190
    abcdef  
 
3191
No match
 
3192
 
 
3193
/(a(?i)b)c/
 
3194
    abc
 
3195
 0: abc
 
3196
 1: ab
 
3197
    aBc
 
3198
 0: aBc
 
3199
 1: aB
 
3200
    *** Failers
 
3201
No match
 
3202
    abC
 
3203
No match
 
3204
    aBC  
 
3205
No match
 
3206
    Abc
 
3207
No match
 
3208
    ABc
 
3209
No match
 
3210
    ABC
 
3211
No match
 
3212
    AbC
 
3213
No match
 
3214
    
 
3215
/a(?i:b)c/
 
3216
    abc
 
3217
 0: abc
 
3218
    aBc
 
3219
 0: aBc
 
3220
    *** Failers 
 
3221
No match
 
3222
    ABC
 
3223
No match
 
3224
    abC
 
3225
No match
 
3226
    aBC
 
3227
No match
 
3228
    
 
3229
/a(?i:b)*c/
 
3230
    aBc
 
3231
 0: aBc
 
3232
    aBBc
 
3233
 0: aBBc
 
3234
    *** Failers 
 
3235
No match
 
3236
    aBC
 
3237
No match
 
3238
    aBBC
 
3239
No match
 
3240
    
 
3241
/a(?=b(?i)c)\w\wd/
 
3242
    abcd
 
3243
 0: abcd
 
3244
    abCd
 
3245
 0: abCd
 
3246
    *** Failers
 
3247
No match
 
3248
    aBCd
 
3249
No match
 
3250
    abcD     
 
3251
No match
 
3252
    
 
3253
/(?s-i:more.*than).*million/i
 
3254
    more than million
 
3255
 0: more than million
 
3256
    more than MILLION
 
3257
 0: more than MILLION
 
3258
    more \n than Million 
 
3259
 0: more \x0a than Million
 
3260
    *** Failers
 
3261
No match
 
3262
    MORE THAN MILLION    
 
3263
No match
 
3264
    more \n than \n million 
 
3265
No match
 
3266
 
 
3267
/(?:(?s-i)more.*than).*million/i
 
3268
    more than million
 
3269
 0: more than million
 
3270
    more than MILLION
 
3271
 0: more than MILLION
 
3272
    more \n than Million 
 
3273
 0: more \x0a than Million
 
3274
    *** Failers
 
3275
No match
 
3276
    MORE THAN MILLION    
 
3277
No match
 
3278
    more \n than \n million 
 
3279
No match
 
3280
    
 
3281
/(?>a(?i)b+)+c/ 
 
3282
    abc
 
3283
 0: abc
 
3284
    aBbc
 
3285
 0: aBbc
 
3286
    aBBc 
 
3287
 0: aBBc
 
3288
    *** Failers
 
3289
No match
 
3290
    Abc
 
3291
No match
 
3292
    abAb    
 
3293
No match
 
3294
    abbC 
 
3295
No match
 
3296
    
 
3297
/(?=a(?i)b)\w\wc/
 
3298
    abc
 
3299
 0: abc
 
3300
    aBc
 
3301
 0: aBc
 
3302
    *** Failers
 
3303
No match
 
3304
    Ab 
 
3305
No match
 
3306
    abC
 
3307
No match
 
3308
    aBC     
 
3309
No match
 
3310
    
 
3311
/(?<=a(?i)b)(\w\w)c/
 
3312
    abxxc
 
3313
 0: xxc
 
3314
 1: xx
 
3315
    aBxxc
 
3316
 0: xxc
 
3317
 1: xx
 
3318
    *** Failers
 
3319
No match
 
3320
    Abxxc
 
3321
No match
 
3322
    ABxxc
 
3323
No match
 
3324
    abxxC      
 
3325
No match
 
3326
 
 
3327
/(?:(a)|b)(?(1)A|B)/
 
3328
    aA
 
3329
 0: aA
 
3330
 1: a
 
3331
    bB
 
3332
 0: bB
 
3333
    *** Failers
 
3334
No match
 
3335
    aB
 
3336
No match
 
3337
    bA    
 
3338
No match
 
3339
 
 
3340
/^(a)?(?(1)a|b)+$/
 
3341
    aa
 
3342
 0: aa
 
3343
 1: a
 
3344
    b
 
3345
 0: b
 
3346
    bb  
 
3347
 0: bb
 
3348
    *** Failers
 
3349
No match
 
3350
    ab   
 
3351
No match
 
3352
 
 
3353
/^(?(?=abc)\w{3}:|\d\d)$/
 
3354
    abc:
 
3355
 0: abc:
 
3356
    12
 
3357
 0: 12
 
3358
    *** Failers
 
3359
No match
 
3360
    123
 
3361
No match
 
3362
    xyz    
 
3363
No match
 
3364
 
 
3365
/^(?(?!abc)\d\d|\w{3}:)$/
 
3366
    abc:
 
3367
 0: abc:
 
3368
    12
 
3369
 0: 12
 
3370
    *** Failers
 
3371
No match
 
3372
    123
 
3373
No match
 
3374
    xyz    
 
3375
No match
 
3376
    
 
3377
/(?(?<=foo)bar|cat)/
 
3378
    foobar
 
3379
 0: bar
 
3380
    cat
 
3381
 0: cat
 
3382
    fcat
 
3383
 0: cat
 
3384
    focat   
 
3385
 0: cat
 
3386
    *** Failers
 
3387
No match
 
3388
    foocat  
 
3389
No match
 
3390
 
 
3391
/(?(?<!foo)cat|bar)/
 
3392
    foobar
 
3393
 0: bar
 
3394
    cat
 
3395
 0: cat
 
3396
    fcat
 
3397
 0: cat
 
3398
    focat   
 
3399
 0: cat
 
3400
    *** Failers
 
3401
No match
 
3402
    foocat  
 
3403
No match
 
3404
 
 
3405
/( \( )? [^()]+ (?(1) \) |) /x
 
3406
    abcd
 
3407
 0: abcd
 
3408
    (abcd)
 
3409
 0: (abcd)
 
3410
 1: (
 
3411
    the quick (abcd) fox
 
3412
 0: the quick 
 
3413
    (abcd   
 
3414
 0: abcd
 
3415
 
 
3416
/( \( )? [^()]+ (?(1) \) ) /x
 
3417
    abcd
 
3418
 0: abcd
 
3419
    (abcd)
 
3420
 0: (abcd)
 
3421
 1: (
 
3422
    the quick (abcd) fox
 
3423
 0: the quick 
 
3424
    (abcd   
 
3425
 0: abcd
 
3426
 
 
3427
/^(?(2)a|(1)(2))+$/
 
3428
    12
 
3429
 0: 12
 
3430
 1: 1
 
3431
 2: 2
 
3432
    12a
 
3433
 0: 12a
 
3434
 1: 1
 
3435
 2: 2
 
3436
    12aa
 
3437
 0: 12aa
 
3438
 1: 1
 
3439
 2: 2
 
3440
    *** Failers
 
3441
No match
 
3442
    1234    
 
3443
No match
 
3444
 
 
3445
/((?i)blah)\s+\1/
 
3446
    blah blah
 
3447
 0: blah blah
 
3448
 1: blah
 
3449
    BLAH BLAH
 
3450
 0: BLAH BLAH
 
3451
 1: BLAH
 
3452
    Blah Blah
 
3453
 0: Blah Blah
 
3454
 1: Blah
 
3455
    blaH blaH
 
3456
 0: blaH blaH
 
3457
 1: blaH
 
3458
    *** Failers
 
3459
No match
 
3460
    blah BLAH
 
3461
No match
 
3462
    Blah blah      
 
3463
No match
 
3464
    blaH blah 
 
3465
No match
 
3466
 
 
3467
/((?i)blah)\s+(?i:\1)/
 
3468
    blah blah
 
3469
 0: blah blah
 
3470
 1: blah
 
3471
    BLAH BLAH
 
3472
 0: BLAH BLAH
 
3473
 1: BLAH
 
3474
    Blah Blah
 
3475
 0: Blah Blah
 
3476
 1: Blah
 
3477
    blaH blaH
 
3478
 0: blaH blaH
 
3479
 1: blaH
 
3480
    blah BLAH
 
3481
 0: blah BLAH
 
3482
 1: blah
 
3483
    Blah blah      
 
3484
 0: Blah blah
 
3485
 1: Blah
 
3486
    blaH blah 
 
3487
 0: blaH blah
 
3488
 1: blaH
 
3489
 
 
3490
/(?>a*)*/
 
3491
    a
 
3492
 0: a
 
3493
    aa
 
3494
 0: aa
 
3495
    aaaa
 
3496
 0: aaaa
 
3497
    
 
3498
/(abc|)+/
 
3499
    abc
 
3500
 0: abc
 
3501
 1: 
 
3502
    abcabc
 
3503
 0: abcabc
 
3504
 1: 
 
3505
    abcabcabc
 
3506
 0: abcabcabc
 
3507
 1: 
 
3508
    xyz      
 
3509
 0: 
 
3510
 1: 
 
3511
 
 
3512
/([a]*)*/
 
3513
    a
 
3514
 0: a
 
3515
 1: 
 
3516
    aaaaa 
 
3517
 0: aaaaa
 
3518
 1: 
 
3519
 
 
3520
/([ab]*)*/
 
3521
    a
 
3522
 0: a
 
3523
 1: 
 
3524
    b
 
3525
 0: b
 
3526
 1: 
 
3527
    ababab
 
3528
 0: ababab
 
3529
 1: 
 
3530
    aaaabcde
 
3531
 0: aaaab
 
3532
 1: 
 
3533
    bbbb    
 
3534
 0: bbbb
 
3535
 1: 
 
3536
 
 
3537
/([^a]*)*/
 
3538
    b
 
3539
 0: b
 
3540
 1: 
 
3541
    bbbb
 
3542
 0: bbbb
 
3543
 1: 
 
3544
    aaa   
 
3545
 0: 
 
3546
 1: 
 
3547
 
 
3548
/([^ab]*)*/
 
3549
    cccc
 
3550
 0: cccc
 
3551
 1: 
 
3552
    abab  
 
3553
 0: 
 
3554
 1: 
 
3555
 
 
3556
/([a]*?)*/
 
3557
    a
 
3558
 0: 
 
3559
 1: 
 
3560
    aaaa 
 
3561
 0: 
 
3562
 1: 
 
3563
 
 
3564
/([ab]*?)*/
 
3565
    a
 
3566
 0: 
 
3567
 1: 
 
3568
    b
 
3569
 0: 
 
3570
 1: 
 
3571
    abab
 
3572
 0: 
 
3573
 1: 
 
3574
    baba   
 
3575
 0: 
 
3576
 1: 
 
3577
 
 
3578
/([^a]*?)*/
 
3579
    b
 
3580
 0: 
 
3581
 1: 
 
3582
    bbbb
 
3583
 0: 
 
3584
 1: 
 
3585
    aaa   
 
3586
 0: 
 
3587
 1: 
 
3588
 
 
3589
/([^ab]*?)*/
 
3590
    c
 
3591
 0: 
 
3592
 1: 
 
3593
    cccc
 
3594
 0: 
 
3595
 1: 
 
3596
    baba   
 
3597
 0: 
 
3598
 1: 
 
3599
 
 
3600
/(?>a*)*/
 
3601
    a
 
3602
 0: a
 
3603
    aaabcde 
 
3604
 0: aaa
 
3605
 
 
3606
/((?>a*))*/
 
3607
    aaaaa
 
3608
 0: aaaaa
 
3609
 1: 
 
3610
    aabbaa 
 
3611
 0: aa
 
3612
 1: 
 
3613
 
 
3614
/((?>a*?))*/
 
3615
    aaaaa
 
3616
 0: 
 
3617
 1: 
 
3618
    aabbaa 
 
3619
 0: 
 
3620
 1: 
 
3621
 
 
3622
/(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /x
 
3623
    12-sep-98
 
3624
 0: 12-sep-98
 
3625
    12-09-98
 
3626
 0: 12-09-98
 
3627
    *** Failers
 
3628
No match
 
3629
    sep-12-98
 
3630
No match
 
3631
        
 
3632
/(?<=(foo))bar\1/
 
3633
    foobarfoo
 
3634
 0: barfoo
 
3635
 1: foo
 
3636
    foobarfootling 
 
3637
 0: barfoo
 
3638
 1: foo
 
3639
    *** Failers
 
3640
No match
 
3641
    foobar
 
3642
No match
 
3643
    barfoo   
 
3644
No match
 
3645
 
 
3646
/(?i:saturday|sunday)/
 
3647
    saturday
 
3648
 0: saturday
 
3649
    sunday
 
3650
 0: sunday
 
3651
    Saturday
 
3652
 0: Saturday
 
3653
    Sunday
 
3654
 0: Sunday
 
3655
    SATURDAY
 
3656
 0: SATURDAY
 
3657
    SUNDAY
 
3658
 0: SUNDAY
 
3659
    SunDay
 
3660
 0: SunDay
 
3661
    
 
3662
/(a(?i)bc|BB)x/
 
3663
    abcx
 
3664
 0: abcx
 
3665
 1: abc
 
3666
    aBCx
 
3667
 0: aBCx
 
3668
 1: aBC
 
3669
    bbx
 
3670
 0: bbx
 
3671
 1: bb
 
3672
    BBx
 
3673
 0: BBx
 
3674
 1: BB
 
3675
    *** Failers
 
3676
No match
 
3677
    abcX
 
3678
No match
 
3679
    aBCX
 
3680
No match
 
3681
    bbX
 
3682
No match
 
3683
    BBX               
 
3684
No match
 
3685
 
 
3686
/^([ab](?i)[cd]|[ef])/
 
3687
    ac
 
3688
 0: ac
 
3689
 1: ac
 
3690
    aC
 
3691
 0: aC
 
3692
 1: aC
 
3693
    bD
 
3694
 0: bD
 
3695
 1: bD
 
3696
    elephant
 
3697
 0: e
 
3698
 1: e
 
3699
    Europe 
 
3700
 0: E
 
3701
 1: E
 
3702
    frog
 
3703
 0: f
 
3704
 1: f
 
3705
    France
 
3706
 0: F
 
3707
 1: F
 
3708
    *** Failers
 
3709
No match
 
3710
    Africa     
 
3711
No match
 
3712
 
 
3713
/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
 
3714
    ab
 
3715
 0: ab
 
3716
 1: ab
 
3717
    aBd
 
3718
 0: aBd
 
3719
 1: aBd
 
3720
    xy
 
3721
 0: xy
 
3722
 1: xy
 
3723
    xY
 
3724
 0: xY
 
3725
 1: xY
 
3726
    zebra
 
3727
 0: z
 
3728
 1: z
 
3729
    Zambesi
 
3730
 0: Z
 
3731
 1: Z
 
3732
    *** Failers
 
3733
No match
 
3734
    aCD  
 
3735
No match
 
3736
    XY  
 
3737
No match
 
3738
 
 
3739
/(?<=foo\n)^bar/m
 
3740
    foo\nbar
 
3741
 0: bar
 
3742
    *** Failers
 
3743
No match
 
3744
    bar
 
3745
No match
 
3746
    baz\nbar   
 
3747
No match
 
3748
 
 
3749
/(?<=(?<!foo)bar)baz/
 
3750
    barbaz
 
3751
 0: baz
 
3752
    barbarbaz 
 
3753
 0: baz
 
3754
    koobarbaz 
 
3755
 0: baz
 
3756
    *** Failers
 
3757
No match
 
3758
    baz
 
3759
No match
 
3760
    foobarbaz 
 
3761
No match
 
3762
 
 
3763
/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
 
3764
/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
 
3765
No match
 
3766
/where it does set $1 to aa when matching aaaaaa./
 
3767
No match
 
3768
 
 
3769
/^(a\1?){4}$/
 
3770
    a
 
3771
No match
 
3772
    aa
 
3773
No match
 
3774
    aaa
 
3775
No match
 
3776
    aaaa
 
3777
 0: aaaa
 
3778
 1: a
 
3779
    aaaaa
 
3780
 0: aaaaa
 
3781
 1: a
 
3782
    aaaaaaa
 
3783
 0: aaaaaaa
 
3784
 1: a
 
3785
    aaaaaaaa
 
3786
No match
 
3787
    aaaaaaaaa
 
3788
No match
 
3789
    aaaaaaaaaa
 
3790
 0: aaaaaaaaaa
 
3791
 1: aaaa
 
3792
    aaaaaaaaaaa
 
3793
No match
 
3794
    aaaaaaaaaaaa
 
3795
No match
 
3796
    aaaaaaaaaaaaa
 
3797
No match
 
3798
    aaaaaaaaaaaaaa
 
3799
No match
 
3800
    aaaaaaaaaaaaaaa
 
3801
No match
 
3802
    aaaaaaaaaaaaaaaa               
 
3803
No match
 
3804
 
 
3805
/^(a\1?)(a\1?)(a\2?)(a\3?)$/
 
3806
    a
 
3807
No match
 
3808
    aa
 
3809
No match
 
3810
    aaa
 
3811
No match
 
3812
    aaaa
 
3813
 0: aaaa
 
3814
 1: a
 
3815
 2: a
 
3816
 3: a
 
3817
 4: a
 
3818
    aaaaa
 
3819
 0: aaaaa
 
3820
 1: a
 
3821
 2: aa
 
3822
 3: a
 
3823
 4: a
 
3824
    aaaaaa
 
3825
 0: aaaaaa
 
3826
 1: a
 
3827
 2: aa
 
3828
 3: a
 
3829
 4: aa
 
3830
    aaaaaaa
 
3831
 0: aaaaaaa
 
3832
 1: a
 
3833
 2: aa
 
3834
 3: aaa
 
3835
 4: a
 
3836
    aaaaaaaa
 
3837
No match
 
3838
    aaaaaaaaa
 
3839
No match
 
3840
    aaaaaaaaaa
 
3841
 0: aaaaaaaaaa
 
3842
 1: a
 
3843
 2: aa
 
3844
 3: aaa
 
3845
 4: aaaa
 
3846
    aaaaaaaaaaa
 
3847
No match
 
3848
    aaaaaaaaaaaa
 
3849
No match
 
3850
    aaaaaaaaaaaaa
 
3851
No match
 
3852
    aaaaaaaaaaaaaa
 
3853
No match
 
3854
    aaaaaaaaaaaaaaa
 
3855
No match
 
3856
    aaaaaaaaaaaaaaaa               
 
3857
No match
 
3858
 
 
3859
/The following tests are taken from the Perl 5.005 test suite; some of them/
 
3860
/are compatible with 5.004, but I'd rather not have to sort them out./
 
3861
No match
 
3862
 
 
3863
/abc/
 
3864
    abc
 
3865
 0: abc
 
3866
    xabcy
 
3867
 0: abc
 
3868
    ababc
 
3869
 0: abc
 
3870
    *** Failers
 
3871
No match
 
3872
    xbc
 
3873
No match
 
3874
    axc
 
3875
No match
 
3876
    abx
 
3877
No match
 
3878
 
 
3879
/ab*c/
 
3880
    abc
 
3881
 0: abc
 
3882
 
 
3883
/ab*bc/
 
3884
    abc
 
3885
 0: abc
 
3886
    abbc
 
3887
 0: abbc
 
3888
    abbbbc
 
3889
 0: abbbbc
 
3890
 
 
3891
/.{1}/
 
3892
    abbbbc
 
3893
 0: a
 
3894
 
 
3895
/.{3,4}/
 
3896
    abbbbc
 
3897
 0: abbb
 
3898
 
 
3899
/ab{0,}bc/
 
3900
    abbbbc
 
3901
 0: abbbbc
 
3902
 
 
3903
/ab+bc/
 
3904
    abbc
 
3905
 0: abbc
 
3906
    *** Failers
 
3907
No match
 
3908
    abc
 
3909
No match
 
3910
    abq
 
3911
No match
 
3912
 
 
3913
/ab{1,}bc/
 
3914
 
 
3915
/ab+bc/
 
3916
    abbbbc
 
3917
 0: abbbbc
 
3918
 
 
3919
/ab{1,}bc/
 
3920
    abbbbc
 
3921
 0: abbbbc
 
3922
 
 
3923
/ab{1,3}bc/
 
3924
    abbbbc
 
3925
 0: abbbbc
 
3926
 
 
3927
/ab{3,4}bc/
 
3928
    abbbbc
 
3929
 0: abbbbc
 
3930
 
 
3931
/ab{4,5}bc/
 
3932
    *** Failers
 
3933
No match
 
3934
    abq
 
3935
No match
 
3936
    abbbbc
 
3937
No match
 
3938
 
 
3939
/ab?bc/
 
3940
    abbc
 
3941
 0: abbc
 
3942
    abc
 
3943
 0: abc
 
3944
 
 
3945
/ab{0,1}bc/
 
3946
    abc
 
3947
 0: abc
 
3948
 
 
3949
/ab?bc/
 
3950
 
 
3951
/ab?c/
 
3952
    abc
 
3953
 0: abc
 
3954
 
 
3955
/ab{0,1}c/
 
3956
    abc
 
3957
 0: abc
 
3958
 
 
3959
/^abc$/
 
3960
    abc
 
3961
 0: abc
 
3962
    *** Failers
 
3963
No match
 
3964
    abbbbc
 
3965
No match
 
3966
    abcc
 
3967
No match
 
3968
 
 
3969
/^abc/
 
3970
    abcc
 
3971
 0: abc
 
3972
 
 
3973
/^abc$/
 
3974
 
 
3975
/abc$/
 
3976
    aabc
 
3977
 0: abc
 
3978
    *** Failers
 
3979
No match
 
3980
    aabc
 
3981
 0: abc
 
3982
    aabcd
 
3983
No match
 
3984
 
 
3985
/^/
 
3986
    abc
 
3987
 0: 
 
3988
 
 
3989
/$/
 
3990
    abc
 
3991
 0: 
 
3992
 
 
3993
/a.c/
 
3994
    abc
 
3995
 0: abc
 
3996
    axc
 
3997
 0: axc
 
3998
 
 
3999
/a.*c/
 
4000
    axyzc
 
4001
 0: axyzc
 
4002
 
 
4003
/a[bc]d/
 
4004
    abd
 
4005
 0: abd
 
4006
    *** Failers
 
4007
No match
 
4008
    axyzd
 
4009
No match
 
4010
    abc
 
4011
No match
 
4012
 
 
4013
/a[b-d]e/
 
4014
    ace
 
4015
 0: ace
 
4016
 
 
4017
/a[b-d]/
 
4018
    aac
 
4019
 0: ac
 
4020
 
 
4021
/a[-b]/
 
4022
    a-
 
4023
 0: a-
 
4024
 
 
4025
/a[b-]/
 
4026
    a-
 
4027
 0: a-
 
4028
 
 
4029
/a]/
 
4030
    a]
 
4031
 0: a]
 
4032
 
 
4033
/a[]]b/
 
4034
    a]b
 
4035
 0: a]b
 
4036
 
 
4037
/a[^bc]d/
 
4038
    aed
 
4039
 0: aed
 
4040
    *** Failers
 
4041
No match
 
4042
    abd
 
4043
No match
 
4044
    abd
 
4045
No match
 
4046
 
 
4047
/a[^-b]c/
 
4048
    adc
 
4049
 0: adc
 
4050
 
 
4051
/a[^]b]c/
 
4052
    adc
 
4053
 0: adc
 
4054
    *** Failers
 
4055
No match
 
4056
    a-c
 
4057
 0: a-c
 
4058
    a]c
 
4059
No match
 
4060
 
 
4061
/\ba\b/
 
4062
    a-
 
4063
 0: a
 
4064
    -a
 
4065
 0: a
 
4066
    -a-
 
4067
 0: a
 
4068
 
 
4069
/\by\b/
 
4070
    *** Failers
 
4071
No match
 
4072
    xy
 
4073
No match
 
4074
    yz
 
4075
No match
 
4076
    xyz
 
4077
No match
 
4078
 
 
4079
/\Ba\B/
 
4080
    *** Failers
 
4081
 0: a
 
4082
    a-
 
4083
No match
 
4084
    -a
 
4085
No match
 
4086
    -a-
 
4087
No match
 
4088
 
 
4089
/\By\b/
 
4090
    xy
 
4091
 0: y
 
4092
 
 
4093
/\by\B/
 
4094
    yz
 
4095
 0: y
 
4096
 
 
4097
/\By\B/
 
4098
    xyz
 
4099
 0: y
 
4100
 
 
4101
/\w/
 
4102
    a
 
4103
 0: a
 
4104
 
 
4105
/\W/
 
4106
    -
 
4107
 0: -
 
4108
    *** Failers
 
4109
 0: *
 
4110
    -
 
4111
 0: -
 
4112
    a
 
4113
No match
 
4114
 
 
4115
/a\sb/
 
4116
    a b
 
4117
 0: a b
 
4118
 
 
4119
/a\Sb/
 
4120
    a-b
 
4121
 0: a-b
 
4122
    *** Failers
 
4123
No match
 
4124
    a-b
 
4125
 0: a-b
 
4126
    a b
 
4127
No match
 
4128
 
 
4129
/\d/
 
4130
    1
 
4131
 0: 1
 
4132
 
 
4133
/\D/
 
4134
    -
 
4135
 0: -
 
4136
    *** Failers
 
4137
 0: *
 
4138
    -
 
4139
 0: -
 
4140
    1
 
4141
No match
 
4142
 
 
4143
/[\w]/
 
4144
    a
 
4145
 0: a
 
4146
 
 
4147
/[\W]/
 
4148
    -
 
4149
 0: -
 
4150
    *** Failers
 
4151
 0: *
 
4152
    -
 
4153
 0: -
 
4154
    a
 
4155
No match
 
4156
 
 
4157
/a[\s]b/
 
4158
    a b
 
4159
 0: a b
 
4160
 
 
4161
/a[\S]b/
 
4162
    a-b
 
4163
 0: a-b
 
4164
    *** Failers
 
4165
No match
 
4166
    a-b
 
4167
 0: a-b
 
4168
    a b
 
4169
No match
 
4170
 
 
4171
/[\d]/
 
4172
    1
 
4173
 0: 1
 
4174
 
 
4175
/[\D]/
 
4176
    -
 
4177
 0: -
 
4178
    *** Failers
 
4179
 0: *
 
4180
    -
 
4181
 0: -
 
4182
    1
 
4183
No match
 
4184
 
 
4185
/ab|cd/
 
4186
    abc
 
4187
 0: ab
 
4188
    abcd
 
4189
 0: ab
 
4190
 
 
4191
/()ef/
 
4192
    def
 
4193
 0: ef
 
4194
 1: 
 
4195
 
 
4196
/$b/
 
4197
 
 
4198
/a\(b/
 
4199
    a(b
 
4200
 0: a(b
 
4201
 
 
4202
/a\(*b/
 
4203
    ab
 
4204
 0: ab
 
4205
    a((b
 
4206
 0: a((b
 
4207
 
 
4208
/a\\b/
 
4209
    a\b
 
4210
No match
 
4211
 
 
4212
/((a))/
 
4213
    abc
 
4214
 0: a
 
4215
 1: a
 
4216
 2: a
 
4217
 
 
4218
/(a)b(c)/
 
4219
    abc
 
4220
 0: abc
 
4221
 1: a
 
4222
 2: c
 
4223
 
 
4224
/a+b+c/
 
4225
    aabbabc
 
4226
 0: abc
 
4227
 
 
4228
/a{1,}b{1,}c/
 
4229
    aabbabc
 
4230
 0: abc
 
4231
 
 
4232
/a.+?c/
 
4233
    abcabc
 
4234
 0: abc
 
4235
 
 
4236
/(a+|b)*/
 
4237
    ab
 
4238
 0: ab
 
4239
 1: b
 
4240
 
 
4241
/(a+|b){0,}/
 
4242
    ab
 
4243
 0: ab
 
4244
 1: b
 
4245
 
 
4246
/(a+|b)+/
 
4247
    ab
 
4248
 0: ab
 
4249
 1: b
 
4250
 
 
4251
/(a+|b){1,}/
 
4252
    ab
 
4253
 0: ab
 
4254
 1: b
 
4255
 
 
4256
/(a+|b)?/
 
4257
    ab
 
4258
 0: a
 
4259
 1: a
 
4260
 
 
4261
/(a+|b){0,1}/
 
4262
    ab
 
4263
 0: a
 
4264
 1: a
 
4265
 
 
4266
/[^ab]*/
 
4267
    cde
 
4268
 0: cde
 
4269
 
 
4270
/abc/
 
4271
    *** Failers
 
4272
No match
 
4273
    b
 
4274
No match
 
4275
    
 
4276
 
 
4277
/a*/
 
4278
    
 
4279
 
 
4280
/([abc])*d/
 
4281
    abbbcd
 
4282
 0: abbbcd
 
4283
 1: c
 
4284
 
 
4285
/([abc])*bcd/
 
4286
    abcd
 
4287
 0: abcd
 
4288
 1: a
 
4289
 
 
4290
/a|b|c|d|e/
 
4291
    e
 
4292
 0: e
 
4293
 
 
4294
/(a|b|c|d|e)f/
 
4295
    ef
 
4296
 0: ef
 
4297
 1: e
 
4298
 
 
4299
/abcd*efg/
 
4300
    abcdefg
 
4301
 0: abcdefg
 
4302
 
 
4303
/ab*/
 
4304
    xabyabbbz
 
4305
 0: ab
 
4306
    xayabbbz
 
4307
 0: a
 
4308
 
 
4309
/(ab|cd)e/
 
4310
    abcde
 
4311
 0: cde
 
4312
 1: cd
 
4313
 
 
4314
/[abhgefdc]ij/
 
4315
    hij
 
4316
 0: hij
 
4317
 
 
4318
/^(ab|cd)e/
 
4319
 
 
4320
/(abc|)ef/
 
4321
    abcdef
 
4322
 0: ef
 
4323
 1: 
 
4324
 
 
4325
/(a|b)c*d/
 
4326
    abcd
 
4327
 0: bcd
 
4328
 1: b
 
4329
 
 
4330
/(ab|ab*)bc/
 
4331
    abc
 
4332
 0: abc
 
4333
 1: a
 
4334
 
 
4335
/a([bc]*)c*/
 
4336
    abc
 
4337
 0: abc
 
4338
 1: bc
 
4339
 
 
4340
/a([bc]*)(c*d)/
 
4341
    abcd
 
4342
 0: abcd
 
4343
 1: bc
 
4344
 2: d
 
4345
 
 
4346
/a([bc]+)(c*d)/
 
4347
    abcd
 
4348
 0: abcd
 
4349
 1: bc
 
4350
 2: d
 
4351
 
 
4352
/a([bc]*)(c+d)/
 
4353
    abcd
 
4354
 0: abcd
 
4355
 1: b
 
4356
 2: cd
 
4357
 
 
4358
/a[bcd]*dcdcde/
 
4359
    adcdcde
 
4360
 0: adcdcde
 
4361
 
 
4362
/a[bcd]+dcdcde/
 
4363
    *** Failers
 
4364
No match
 
4365
    abcde
 
4366
No match
 
4367
    adcdcde
 
4368
No match
 
4369
 
 
4370
/(ab|a)b*c/
 
4371
    abc
 
4372
 0: abc
 
4373
 1: ab
 
4374
 
 
4375
/((a)(b)c)(d)/
 
4376
    abcd
 
4377
 0: abcd
 
4378
 1: abc
 
4379
 2: a
 
4380
 3: b
 
4381
 4: d
 
4382
 
 
4383
/[a-zA-Z_][a-zA-Z0-9_]*/
 
4384
    alpha
 
4385
 0: alpha
 
4386
 
 
4387
/^a(bc+|b[eh])g|.h$/
 
4388
    abh
 
4389
 0: bh
 
4390
 
 
4391
/(bc+d$|ef*g.|h?i(j|k))/
 
4392
    effgz
 
4393
 0: effgz
 
4394
 1: effgz
 
4395
    ij
 
4396
 0: ij
 
4397
 1: ij
 
4398
 2: j
 
4399
    reffgz
 
4400
 0: effgz
 
4401
 1: effgz
 
4402
    *** Failers
 
4403
No match
 
4404
    effg
 
4405
No match
 
4406
    bcdd
 
4407
No match
 
4408
 
 
4409
/((((((((((a))))))))))/
 
4410
    a
 
4411
 0: a
 
4412
 1: a
 
4413
 2: a
 
4414
 3: a
 
4415
 4: a
 
4416
 5: a
 
4417
 6: a
 
4418
 7: a
 
4419
 8: a
 
4420
 9: a
 
4421
10: a
 
4422
 
 
4423
/((((((((((a))))))))))\10/
 
4424
    aa
 
4425
 0: aa
 
4426
 1: a
 
4427
 2: a
 
4428
 3: a
 
4429
 4: a
 
4430
 5: a
 
4431
 6: a
 
4432
 7: a
 
4433
 8: a
 
4434
 9: a
 
4435
10: a
 
4436
 
 
4437
/(((((((((a)))))))))/
 
4438
    a
 
4439
 0: a
 
4440
 1: a
 
4441
 2: a
 
4442
 3: a
 
4443
 4: a
 
4444
 5: a
 
4445
 6: a
 
4446
 7: a
 
4447
 8: a
 
4448
 9: a
 
4449
 
 
4450
/multiple words of text/
 
4451
    *** Failers
 
4452
No match
 
4453
    aa
 
4454
No match
 
4455
    uh-uh
 
4456
No match
 
4457
 
 
4458
/multiple words/
 
4459
    multiple words, yeah
 
4460
 0: multiple words
 
4461
 
 
4462
/(.*)c(.*)/
 
4463
    abcde
 
4464
 0: abcde
 
4465
 1: ab
 
4466
 2: de
 
4467
 
 
4468
/\((.*), (.*)\)/
 
4469
    (a, b)
 
4470
 0: (a, b)
 
4471
 1: a
 
4472
 2: b
 
4473
 
 
4474
/[k]/
 
4475
 
 
4476
/abcd/
 
4477
    abcd
 
4478
 0: abcd
 
4479
 
 
4480
/a(bc)d/
 
4481
    abcd
 
4482
 0: abcd
 
4483
 1: bc
 
4484
 
 
4485
/a[-]?c/
 
4486
    ac
 
4487
 0: ac
 
4488
 
 
4489
/(abc)\1/
 
4490
    abcabc
 
4491
 0: abcabc
 
4492
 1: abc
 
4493
 
 
4494
/([a-c]*)\1/
 
4495
    abcabc
 
4496
 0: abcabc
 
4497
 1: abc
 
4498
 
 
4499
/(a)|\1/
 
4500
    a
 
4501
 0: a
 
4502
 1: a
 
4503
    *** Failers
 
4504
 0: a
 
4505
 1: a
 
4506
    ab
 
4507
 0: a
 
4508
 1: a
 
4509
    x
 
4510
No match
 
4511
 
 
4512
/(([a-c])b*?\2)*/
 
4513
    ababbbcbc
 
4514
 0: ababb
 
4515
 1: bb
 
4516
 2: b
 
4517
 
 
4518
/(([a-c])b*?\2){3}/
 
4519
    ababbbcbc
 
4520
 0: ababbbcbc
 
4521
 1: cbc
 
4522
 2: c
 
4523
 
 
4524
/((\3|b)\2(a)x)+/
 
4525
    aaaxabaxbaaxbbax
 
4526
 0: bbax
 
4527
 1: bbax
 
4528
 2: b
 
4529
 3: a
 
4530
 
 
4531
/((\3|b)\2(a)){2,}/
 
4532
    bbaababbabaaaaabbaaaabba
 
4533
 0: bbaaaabba
 
4534
 1: bba
 
4535
 2: b
 
4536
 3: a
 
4537
 
 
4538
/abc/i
 
4539
    ABC
 
4540
 0: ABC
 
4541
    XABCY
 
4542
 0: ABC
 
4543
    ABABC
 
4544
 0: ABC
 
4545
    *** Failers
 
4546
No match
 
4547
    aaxabxbaxbbx
 
4548
No match
 
4549
    XBC
 
4550
No match
 
4551
    AXC
 
4552
No match
 
4553
    ABX
 
4554
No match
 
4555
 
 
4556
/ab*c/i
 
4557
    ABC
 
4558
 0: ABC
 
4559
 
 
4560
/ab*bc/i
 
4561
    ABC
 
4562
 0: ABC
 
4563
    ABBC
 
4564
 0: ABBC
 
4565
 
 
4566
/ab*?bc/i
 
4567
    ABBBBC
 
4568
 0: ABBBBC
 
4569
 
 
4570
/ab{0,}?bc/i
 
4571
    ABBBBC
 
4572
 0: ABBBBC
 
4573
 
 
4574
/ab+?bc/i
 
4575
    ABBC
 
4576
 0: ABBC
 
4577
 
 
4578
/ab+bc/i
 
4579
    *** Failers
 
4580
No match
 
4581
    ABC
 
4582
No match
 
4583
    ABQ
 
4584
No match
 
4585
 
 
4586
/ab{1,}bc/i
 
4587
 
 
4588
/ab+bc/i
 
4589
    ABBBBC
 
4590
 0: ABBBBC
 
4591
 
 
4592
/ab{1,}?bc/i
 
4593
    ABBBBC
 
4594
 0: ABBBBC
 
4595
 
 
4596
/ab{1,3}?bc/i
 
4597
    ABBBBC
 
4598
 0: ABBBBC
 
4599
 
 
4600
/ab{3,4}?bc/i
 
4601
    ABBBBC
 
4602
 0: ABBBBC
 
4603
 
 
4604
/ab{4,5}?bc/i
 
4605
    *** Failers
 
4606
No match
 
4607
    ABQ
 
4608
No match
 
4609
    ABBBBC
 
4610
No match
 
4611
 
 
4612
/ab??bc/i
 
4613
    ABBC
 
4614
 0: ABBC
 
4615
    ABC
 
4616
 0: ABC
 
4617
 
 
4618
/ab{0,1}?bc/i
 
4619
    ABC
 
4620
 0: ABC
 
4621
 
 
4622
/ab??bc/i
 
4623
 
 
4624
/ab??c/i
 
4625
    ABC
 
4626
 0: ABC
 
4627
 
 
4628
/ab{0,1}?c/i
 
4629
    ABC
 
4630
 0: ABC
 
4631
 
 
4632
/^abc$/i
 
4633
    ABC
 
4634
 0: ABC
 
4635
    *** Failers
 
4636
No match
 
4637
    ABBBBC
 
4638
No match
 
4639
    ABCC
 
4640
No match
 
4641
 
 
4642
/^abc/i
 
4643
    ABCC
 
4644
 0: ABC
 
4645
 
 
4646
/^abc$/i
 
4647
 
 
4648
/abc$/i
 
4649
    AABC
 
4650
 0: ABC
 
4651
 
 
4652
/^/i
 
4653
    ABC
 
4654
 0: 
 
4655
 
 
4656
/$/i
 
4657
    ABC
 
4658
 0: 
 
4659
 
 
4660
/a.c/i
 
4661
    ABC
 
4662
 0: ABC
 
4663
    AXC
 
4664
 0: AXC
 
4665
 
 
4666
/a.*?c/i
 
4667
    AXYZC
 
4668
 0: AXYZC
 
4669
 
 
4670
/a.*c/i
 
4671
    *** Failers
 
4672
No match
 
4673
    AABC
 
4674
 0: AABC
 
4675
    AXYZD
 
4676
No match
 
4677
 
 
4678
/a[bc]d/i
 
4679
    ABD
 
4680
 0: ABD
 
4681
 
 
4682
/a[b-d]e/i
 
4683
    ACE
 
4684
 0: ACE
 
4685
    *** Failers
 
4686
No match
 
4687
    ABC
 
4688
No match
 
4689
    ABD
 
4690
No match
 
4691
 
 
4692
/a[b-d]/i
 
4693
    AAC
 
4694
 0: AC
 
4695
 
 
4696
/a[-b]/i
 
4697
    A-
 
4698
 0: A-
 
4699
 
 
4700
/a[b-]/i
 
4701
    A-
 
4702
 0: A-
 
4703
 
 
4704
/a]/i
 
4705
    A]
 
4706
 0: A]
 
4707
 
 
4708
/a[]]b/i
 
4709
    A]B
 
4710
 0: A]B
 
4711
 
 
4712
/a[^bc]d/i
 
4713
    AED
 
4714
 0: AED
 
4715
 
 
4716
/a[^-b]c/i
 
4717
    ADC
 
4718
 0: ADC
 
4719
    *** Failers
 
4720
No match
 
4721
    ABD
 
4722
No match
 
4723
    A-C
 
4724
No match
 
4725
 
 
4726
/a[^]b]c/i
 
4727
    ADC
 
4728
 0: ADC
 
4729
 
 
4730
/ab|cd/i
 
4731
    ABC
 
4732
 0: AB
 
4733
    ABCD
 
4734
 0: AB
 
4735
 
 
4736
/()ef/i
 
4737
    DEF
 
4738
 0: EF
 
4739
 1: 
 
4740
 
 
4741
/$b/i
 
4742
    *** Failers
 
4743
No match
 
4744
    A]C
 
4745
No match
 
4746
    B
 
4747
No match
 
4748
 
 
4749
/a\(b/i
 
4750
    A(B
 
4751
 0: A(B
 
4752
 
 
4753
/a\(*b/i
 
4754
    AB
 
4755
 0: AB
 
4756
    A((B
 
4757
 0: A((B
 
4758
 
 
4759
/a\\b/i
 
4760
    A\B
 
4761
No match
 
4762
 
 
4763
/((a))/i
 
4764
    ABC
 
4765
 0: A
 
4766
 1: A
 
4767
 2: A
 
4768
 
 
4769
/(a)b(c)/i
 
4770
    ABC
 
4771
 0: ABC
 
4772
 1: A
 
4773
 2: C
 
4774
 
 
4775
/a+b+c/i
 
4776
    AABBABC
 
4777
 0: ABC
 
4778
 
 
4779
/a{1,}b{1,}c/i
 
4780
    AABBABC
 
4781
 0: ABC
 
4782
 
 
4783
/a.+?c/i
 
4784
    ABCABC
 
4785
 0: ABC
 
4786
 
 
4787
/a.*?c/i
 
4788
    ABCABC
 
4789
 0: ABC
 
4790
 
 
4791
/a.{0,5}?c/i
 
4792
    ABCABC
 
4793
 0: ABC
 
4794
 
 
4795
/(a+|b)*/i
 
4796
    AB
 
4797
 0: AB
 
4798
 1: B
 
4799
 
 
4800
/(a+|b){0,}/i
 
4801
    AB
 
4802
 0: AB
 
4803
 1: B
 
4804
 
 
4805
/(a+|b)+/i
 
4806
    AB
 
4807
 0: AB
 
4808
 1: B
 
4809
 
 
4810
/(a+|b){1,}/i
 
4811
    AB
 
4812
 0: AB
 
4813
 1: B
 
4814
 
 
4815
/(a+|b)?/i
 
4816
    AB
 
4817
 0: A
 
4818
 1: A
 
4819
 
 
4820
/(a+|b){0,1}/i
 
4821
    AB
 
4822
 0: A
 
4823
 1: A
 
4824
 
 
4825
/(a+|b){0,1}?/i
 
4826
    AB
 
4827
 0: 
 
4828
 
 
4829
/[^ab]*/i
 
4830
    CDE
 
4831
 0: CDE
 
4832
 
 
4833
/abc/i
 
4834
 
 
4835
/a*/i
 
4836
    
 
4837
 
 
4838
/([abc])*d/i
 
4839
    ABBBCD
 
4840
 0: ABBBCD
 
4841
 1: C
 
4842
 
 
4843
/([abc])*bcd/i
 
4844
    ABCD
 
4845
 0: ABCD
 
4846
 1: A
 
4847
 
 
4848
/a|b|c|d|e/i
 
4849
    E
 
4850
 0: E
 
4851
 
 
4852
/(a|b|c|d|e)f/i
 
4853
    EF
 
4854
 0: EF
 
4855
 1: E
 
4856
 
 
4857
/abcd*efg/i
 
4858
    ABCDEFG
 
4859
 0: ABCDEFG
 
4860
 
 
4861
/ab*/i
 
4862
    XABYABBBZ
 
4863
 0: AB
 
4864
    XAYABBBZ
 
4865
 0: A
 
4866
 
 
4867
/(ab|cd)e/i
 
4868
    ABCDE
 
4869
 0: CDE
 
4870
 1: CD
 
4871
 
 
4872
/[abhgefdc]ij/i
 
4873
    HIJ
 
4874
 0: HIJ
 
4875
 
 
4876
/^(ab|cd)e/i
 
4877
    ABCDE
 
4878
No match
 
4879
 
 
4880
/(abc|)ef/i
 
4881
    ABCDEF
 
4882
 0: EF
 
4883
 1: 
 
4884
 
 
4885
/(a|b)c*d/i
 
4886
    ABCD
 
4887
 0: BCD
 
4888
 1: B
 
4889
 
 
4890
/(ab|ab*)bc/i
 
4891
    ABC
 
4892
 0: ABC
 
4893
 1: A
 
4894
 
 
4895
/a([bc]*)c*/i
 
4896
    ABC
 
4897
 0: ABC
 
4898
 1: BC
 
4899
 
 
4900
/a([bc]*)(c*d)/i
 
4901
    ABCD
 
4902
 0: ABCD
 
4903
 1: BC
 
4904
 2: D
 
4905
 
 
4906
/a([bc]+)(c*d)/i
 
4907
    ABCD
 
4908
 0: ABCD
 
4909
 1: BC
 
4910
 2: D
 
4911
 
 
4912
/a([bc]*)(c+d)/i
 
4913
    ABCD
 
4914
 0: ABCD
 
4915
 1: B
 
4916
 2: CD
 
4917
 
 
4918
/a[bcd]*dcdcde/i
 
4919
    ADCDCDE
 
4920
 0: ADCDCDE
 
4921
 
 
4922
/a[bcd]+dcdcde/i
 
4923
 
 
4924
/(ab|a)b*c/i
 
4925
    ABC
 
4926
 0: ABC
 
4927
 1: AB
 
4928
 
 
4929
/((a)(b)c)(d)/i
 
4930
    ABCD
 
4931
 0: ABCD
 
4932
 1: ABC
 
4933
 2: A
 
4934
 3: B
 
4935
 4: D
 
4936
 
 
4937
/[a-zA-Z_][a-zA-Z0-9_]*/i
 
4938
    ALPHA
 
4939
 0: ALPHA
 
4940
 
 
4941
/^a(bc+|b[eh])g|.h$/i
 
4942
    ABH
 
4943
 0: BH
 
4944
 
 
4945
/(bc+d$|ef*g.|h?i(j|k))/i
 
4946
    EFFGZ
 
4947
 0: EFFGZ
 
4948
 1: EFFGZ
 
4949
    IJ
 
4950
 0: IJ
 
4951
 1: IJ
 
4952
 2: J
 
4953
    REFFGZ
 
4954
 0: EFFGZ
 
4955
 1: EFFGZ
 
4956
    *** Failers
 
4957
No match
 
4958
    ADCDCDE
 
4959
No match
 
4960
    EFFG
 
4961
No match
 
4962
    BCDD
 
4963
No match
 
4964
 
 
4965
/((((((((((a))))))))))/i
 
4966
    A
 
4967
 0: A
 
4968
 1: A
 
4969
 2: A
 
4970
 3: A
 
4971
 4: A
 
4972
 5: A
 
4973
 6: A
 
4974
 7: A
 
4975
 8: A
 
4976
 9: A
 
4977
10: A
 
4978
 
 
4979
/((((((((((a))))))))))\10/i
 
4980
    AA
 
4981
 0: AA
 
4982
 1: A
 
4983
 2: A
 
4984
 3: A
 
4985
 4: A
 
4986
 5: A
 
4987
 6: A
 
4988
 7: A
 
4989
 8: A
 
4990
 9: A
 
4991
10: A
 
4992
 
 
4993
/(((((((((a)))))))))/i
 
4994
    A
 
4995
 0: A
 
4996
 1: A
 
4997
 2: A
 
4998
 3: A
 
4999
 4: A
 
5000
 5: A
 
5001
 6: A
 
5002
 7: A
 
5003
 8: A
 
5004
 9: A
 
5005
 
 
5006
/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
 
5007
    A
 
5008
 0: A
 
5009
 1: A
 
5010
 
 
5011
/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
 
5012
    C
 
5013
 0: C
 
5014
 1: C
 
5015
 
 
5016
/multiple words of text/i
 
5017
    *** Failers
 
5018
No match
 
5019
    AA
 
5020
No match
 
5021
    UH-UH
 
5022
No match
 
5023
 
 
5024
/multiple words/i
 
5025
    MULTIPLE WORDS, YEAH
 
5026
 0: MULTIPLE WORDS
 
5027
 
 
5028
/(.*)c(.*)/i
 
5029
    ABCDE
 
5030
 0: ABCDE
 
5031
 1: AB
 
5032
 2: DE
 
5033
 
 
5034
/\((.*), (.*)\)/i
 
5035
    (A, B)
 
5036
 0: (A, B)
 
5037
 1: A
 
5038
 2: B
 
5039
 
 
5040
/[k]/i
 
5041
 
 
5042
/abcd/i
 
5043
    ABCD
 
5044
 0: ABCD
 
5045
 
 
5046
/a(bc)d/i
 
5047
    ABCD
 
5048
 0: ABCD
 
5049
 1: BC
 
5050
 
 
5051
/a[-]?c/i
 
5052
    AC
 
5053
 0: AC
 
5054
 
 
5055
/(abc)\1/i
 
5056
    ABCABC
 
5057
 0: ABCABC
 
5058
 1: ABC
 
5059
 
 
5060
/([a-c]*)\1/i
 
5061
    ABCABC
 
5062
 0: ABCABC
 
5063
 1: ABC
 
5064
 
 
5065
/a(?!b)./
 
5066
    abad
 
5067
 0: ad
 
5068
 
 
5069
/a(?=d)./
 
5070
    abad
 
5071
 0: ad
 
5072
 
 
5073
/a(?=c|d)./
 
5074
    abad
 
5075
 0: ad
 
5076
 
 
5077
/a(?:b|c|d)(.)/
 
5078
    ace
 
5079
 0: ace
 
5080
 1: e
 
5081
 
 
5082
/a(?:b|c|d)*(.)/
 
5083
    ace
 
5084
 0: ace
 
5085
 1: e
 
5086
 
 
5087
/a(?:b|c|d)+?(.)/
 
5088
    ace
 
5089
 0: ace
 
5090
 1: e
 
5091
    acdbcdbe
 
5092
 0: acd
 
5093
 1: d
 
5094
 
 
5095
/a(?:b|c|d)+(.)/
 
5096
    acdbcdbe
 
5097
 0: acdbcdbe
 
5098
 1: e
 
5099
 
 
5100
/a(?:b|c|d){2}(.)/
 
5101
    acdbcdbe
 
5102
 0: acdb
 
5103
 1: b
 
5104
 
 
5105
/a(?:b|c|d){4,5}(.)/
 
5106
    acdbcdbe
 
5107
 0: acdbcdb
 
5108
 1: b
 
5109
 
 
5110
/a(?:b|c|d){4,5}?(.)/
 
5111
    acdbcdbe
 
5112
 0: acdbcd
 
5113
 1: d
 
5114
 
 
5115
/((foo)|(bar))*/
 
5116
    foobar
 
5117
 0: foobar
 
5118
 1: bar
 
5119
 2: foo
 
5120
 3: bar
 
5121
 
 
5122
/a(?:b|c|d){6,7}(.)/
 
5123
    acdbcdbe
 
5124
 0: acdbcdbe
 
5125
 1: e
 
5126
 
 
5127
/a(?:b|c|d){6,7}?(.)/
 
5128
    acdbcdbe
 
5129
 0: acdbcdbe
 
5130
 1: e
 
5131
 
 
5132
/a(?:b|c|d){5,6}(.)/
 
5133
    acdbcdbe
 
5134
 0: acdbcdbe
 
5135
 1: e
 
5136
 
 
5137
/a(?:b|c|d){5,6}?(.)/
 
5138
    acdbcdbe
 
5139
 0: acdbcdb
 
5140
 1: b
 
5141
 
 
5142
/a(?:b|c|d){5,7}(.)/
 
5143
    acdbcdbe
 
5144
 0: acdbcdbe
 
5145
 1: e
 
5146
 
 
5147
/a(?:b|c|d){5,7}?(.)/
 
5148
    acdbcdbe
 
5149
 0: acdbcdb
 
5150
 1: b
 
5151
 
 
5152
/a(?:b|(c|e){1,2}?|d)+?(.)/
 
5153
    ace
 
5154
 0: ace
 
5155
 1: c
 
5156
 2: e
 
5157
 
 
5158
/^(.+)?B/
 
5159
    AB
 
5160
 0: AB
 
5161
 1: A
 
5162
 
 
5163
/^([^a-z])|(\^)$/
 
5164
    .
 
5165
 0: .
 
5166
 1: .
 
5167
 
 
5168
/^[<>]&/
 
5169
    <&OUT
 
5170
 0: <&
 
5171
 
 
5172
/^(a\1?){4}$/
 
5173
    aaaaaaaaaa
 
5174
 0: aaaaaaaaaa
 
5175
 1: aaaa
 
5176
    *** Failers
 
5177
No match
 
5178
    AB
 
5179
No match
 
5180
    aaaaaaaaa
 
5181
No match
 
5182
    aaaaaaaaaaa
 
5183
No match
 
5184
 
 
5185
/^(a(?(1)\1)){4}$/
 
5186
    aaaaaaaaaa
 
5187
 0: aaaaaaaaaa
 
5188
 1: aaaa
 
5189
    *** Failers
 
5190
No match
 
5191
    aaaaaaaaa
 
5192
No match
 
5193
    aaaaaaaaaaa
 
5194
No match
 
5195
 
 
5196
/(?:(f)(o)(o)|(b)(a)(r))*/
 
5197
    foobar
 
5198
 0: foobar
 
5199
 1: f
 
5200
 2: o
 
5201
 3: o
 
5202
 4: b
 
5203
 5: a
 
5204
 6: r
 
5205
 
 
5206
/(?<=a)b/
 
5207
    ab
 
5208
 0: b
 
5209
    *** Failers
 
5210
No match
 
5211
    cb
 
5212
No match
 
5213
    b
 
5214
No match
 
5215
 
 
5216
/(?<!c)b/
 
5217
    ab
 
5218
 0: b
 
5219
    b
 
5220
 0: b
 
5221
    b
 
5222
 0: b
 
5223
 
 
5224
/(?:..)*a/
 
5225
    aba
 
5226
 0: aba
 
5227
 
 
5228
/(?:..)*?a/
 
5229
    aba
 
5230
 0: a
 
5231
 
 
5232
/^(?:b|a(?=(.)))*\1/
 
5233
    abc
 
5234
 0: ab
 
5235
 1: b
 
5236
 
 
5237
/^(){3,5}/
 
5238
    abc
 
5239
 0: 
 
5240
 1: 
 
5241
 
 
5242
/^(a+)*ax/
 
5243
    aax
 
5244
 0: aax
 
5245
 1: a
 
5246
 
 
5247
/^((a|b)+)*ax/
 
5248
    aax
 
5249
 0: aax
 
5250
 1: a
 
5251
 2: a
 
5252
 
 
5253
/^((a|bc)+)*ax/
 
5254
    aax
 
5255
 0: aax
 
5256
 1: a
 
5257
 2: a
 
5258
 
 
5259
/(a|x)*ab/
 
5260
    cab
 
5261
 0: ab
 
5262
 
 
5263
/(a)*ab/
 
5264
    cab
 
5265
 0: ab
 
5266
 
 
5267
/(?:(?i)a)b/
 
5268
    ab
 
5269
 0: ab
 
5270
 
 
5271
/((?i)a)b/
 
5272
    ab
 
5273
 0: ab
 
5274
 1: a
 
5275
 
 
5276
/(?:(?i)a)b/
 
5277
    Ab
 
5278
 0: Ab
 
5279
 
 
5280
/((?i)a)b/
 
5281
    Ab
 
5282
 0: Ab
 
5283
 1: A
 
5284
 
 
5285
/(?:(?i)a)b/
 
5286
    *** Failers
 
5287
No match
 
5288
    cb
 
5289
No match
 
5290
    aB
 
5291
No match
 
5292
 
 
5293
/((?i)a)b/
 
5294
 
 
5295
/(?i:a)b/
 
5296
    ab
 
5297
 0: ab
 
5298
 
 
5299
/((?i:a))b/
 
5300
    ab
 
5301
 0: ab
 
5302
 1: a
 
5303
 
 
5304
/(?i:a)b/
 
5305
    Ab
 
5306
 0: Ab
 
5307
 
 
5308
/((?i:a))b/
 
5309
    Ab
 
5310
 0: Ab
 
5311
 1: A
 
5312
 
 
5313
/(?i:a)b/
 
5314
    *** Failers
 
5315
No match
 
5316
    aB
 
5317
No match
 
5318
    aB
 
5319
No match
 
5320
 
 
5321
/((?i:a))b/
 
5322
 
 
5323
/(?:(?-i)a)b/i
 
5324
    ab
 
5325
 0: ab
 
5326
 
 
5327
/((?-i)a)b/i
 
5328
    ab
 
5329
 0: ab
 
5330
 1: a
 
5331
 
 
5332
/(?:(?-i)a)b/i
 
5333
    aB
 
5334
 0: aB
 
5335
 
 
5336
/((?-i)a)b/i
 
5337
    aB
 
5338
 0: aB
 
5339
 1: a
 
5340
 
 
5341
/(?:(?-i)a)b/i
 
5342
    *** Failers
 
5343
No match
 
5344
    aB
 
5345
 0: aB
 
5346
    Ab
 
5347
No match
 
5348
 
 
5349
/((?-i)a)b/i
 
5350
 
 
5351
/(?:(?-i)a)b/i
 
5352
    aB
 
5353
 0: aB
 
5354
 
 
5355
/((?-i)a)b/i
 
5356
    aB
 
5357
 0: aB
 
5358
 1: a
 
5359
 
 
5360
/(?:(?-i)a)b/i
 
5361
    *** Failers
 
5362
No match
 
5363
    Ab
 
5364
No match
 
5365
    AB
 
5366
No match
 
5367
 
 
5368
/((?-i)a)b/i
 
5369
 
 
5370
/(?-i:a)b/i
 
5371
    ab
 
5372
 0: ab
 
5373
 
 
5374
/((?-i:a))b/i
 
5375
    ab
 
5376
 0: ab
 
5377
 1: a
 
5378
 
 
5379
/(?-i:a)b/i
 
5380
    aB
 
5381
 0: aB
 
5382
 
 
5383
/((?-i:a))b/i
 
5384
    aB
 
5385
 0: aB
 
5386
 1: a
 
5387
 
 
5388
/(?-i:a)b/i
 
5389
    *** Failers
 
5390
No match
 
5391
    AB
 
5392
No match
 
5393
    Ab
 
5394
No match
 
5395
 
 
5396
/((?-i:a))b/i
 
5397
 
 
5398
/(?-i:a)b/i
 
5399
    aB
 
5400
 0: aB
 
5401
 
 
5402
/((?-i:a))b/i
 
5403
    aB
 
5404
 0: aB
 
5405
 1: a
 
5406
 
 
5407
/(?-i:a)b/i
 
5408
    *** Failers
 
5409
No match
 
5410
    Ab
 
5411
No match
 
5412
    AB
 
5413
No match
 
5414
 
 
5415
/((?-i:a))b/i
 
5416
 
 
5417
/((?-i:a.))b/i
 
5418
    *** Failers
 
5419
No match
 
5420
    AB
 
5421
No match
 
5422
    a\nB
 
5423
No match
 
5424
 
 
5425
/((?s-i:a.))b/i
 
5426
    a\nB
 
5427
 0: a\x0aB
 
5428
 1: a\x0a
 
5429
 
 
5430
/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
 
5431
    cabbbb
 
5432
 0: cabbbb
 
5433
 
 
5434
/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
 
5435
    caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
5436
 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
5437
 
 
5438
/(ab)\d\1/i
 
5439
    Ab4ab
 
5440
 0: Ab4ab
 
5441
 1: Ab
 
5442
    ab4Ab
 
5443
 0: ab4Ab
 
5444
 1: ab
 
5445
 
 
5446
/foo\w*\d{4}baz/
 
5447
    foobar1234baz
 
5448
 0: foobar1234baz
 
5449
 
 
5450
/x(~~)*(?:(?:F)?)?/
 
5451
    x~~
 
5452
 0: x~~
 
5453
 1: ~~
 
5454
 
 
5455
/^a(?#xxx){3}c/
 
5456
    aaac
 
5457
 0: aaac
 
5458
 
 
5459
/^a (?#xxx) (?#yyy) {3}c/x
 
5460
    aaac
 
5461
 0: aaac
 
5462
 
 
5463
/(?<![cd])b/
 
5464
    *** Failers
 
5465
No match
 
5466
    B\nB
 
5467
No match
 
5468
    dbcb
 
5469
No match
 
5470
 
 
5471
/(?<![cd])[ab]/
 
5472
    dbaacb
 
5473
 0: a
 
5474
 
 
5475
/(?<!(c|d))b/
 
5476
 
 
5477
/(?<!(c|d))[ab]/
 
5478
    dbaacb
 
5479
 0: a
 
5480
 
 
5481
/(?<!cd)[ab]/
 
5482
    cdaccb
 
5483
 0: b
 
5484
 
 
5485
/^(?:a?b?)*$/
 
5486
    *** Failers
 
5487
No match
 
5488
    dbcb
 
5489
No match
 
5490
    a--
 
5491
No match
 
5492
 
 
5493
/((?s)^a(.))((?m)^b$)/
 
5494
    a\nb\nc\n
 
5495
 0: a\x0ab
 
5496
 1: a\x0a
 
5497
 2: \x0a
 
5498
 3: b
 
5499
 
 
5500
/((?m)^b$)/
 
5501
    a\nb\nc\n
 
5502
 0: b
 
5503
 1: b
 
5504
 
 
5505
/(?m)^b/
 
5506
    a\nb\n
 
5507
 0: b
 
5508
 
 
5509
/(?m)^(b)/
 
5510
    a\nb\n
 
5511
 0: b
 
5512
 1: b
 
5513
 
 
5514
/((?m)^b)/
 
5515
    a\nb\n
 
5516
 0: b
 
5517
 1: b
 
5518
 
 
5519
/\n((?m)^b)/
 
5520
    a\nb\n
 
5521
 0: \x0ab
 
5522
 1: b
 
5523
 
 
5524
/((?s).)c(?!.)/
 
5525
    a\nb\nc\n
 
5526
 0: \x0ac
 
5527
 1: \x0a
 
5528
    a\nb\nc\n
 
5529
 0: \x0ac
 
5530
 1: \x0a
 
5531
 
 
5532
/((?s)b.)c(?!.)/
 
5533
    a\nb\nc\n
 
5534
 0: b\x0ac
 
5535
 1: b\x0a
 
5536
    a\nb\nc\n
 
5537
 0: b\x0ac
 
5538
 1: b\x0a
 
5539
 
 
5540
/^b/
 
5541
 
 
5542
/()^b/
 
5543
    *** Failers
 
5544
No match
 
5545
    a\nb\nc\n
 
5546
No match
 
5547
    a\nb\nc\n
 
5548
No match
 
5549
 
 
5550
/((?m)^b)/
 
5551
    a\nb\nc\n
 
5552
 0: b
 
5553
 1: b
 
5554
 
 
5555
/(?(1)a|b)/
 
5556
 
 
5557
/(?(1)b|a)/
 
5558
    a
 
5559
 0: a
 
5560
 
 
5561
/(x)?(?(1)a|b)/
 
5562
    *** Failers
 
5563
No match
 
5564
    a
 
5565
No match
 
5566
    a
 
5567
No match
 
5568
 
 
5569
/(x)?(?(1)b|a)/
 
5570
    a
 
5571
 0: a
 
5572
 
 
5573
/()?(?(1)b|a)/
 
5574
    a
 
5575
 0: a
 
5576
 
 
5577
/()(?(1)b|a)/
 
5578
 
 
5579
/()?(?(1)a|b)/
 
5580
    a
 
5581
 0: a
 
5582
 1: 
 
5583
 
 
5584
/^(\()?blah(?(1)(\)))$/
 
5585
    (blah)
 
5586
 0: (blah)
 
5587
 1: (
 
5588
 2: )
 
5589
    blah
 
5590
 0: blah
 
5591
    *** Failers
 
5592
No match
 
5593
    a
 
5594
No match
 
5595
    blah)
 
5596
No match
 
5597
    (blah
 
5598
No match
 
5599
 
 
5600
/^(\(+)?blah(?(1)(\)))$/
 
5601
    (blah)
 
5602
 0: (blah)
 
5603
 1: (
 
5604
 2: )
 
5605
    blah
 
5606
 0: blah
 
5607
    *** Failers
 
5608
No match
 
5609
    blah)
 
5610
No match
 
5611
    (blah
 
5612
No match
 
5613
 
 
5614
/(?(?!a)a|b)/
 
5615
 
 
5616
/(?(?!a)b|a)/
 
5617
    a
 
5618
 0: a
 
5619
 
 
5620
/(?(?=a)b|a)/
 
5621
    *** Failers
 
5622
No match
 
5623
    a
 
5624
No match
 
5625
    a
 
5626
No match
 
5627
 
 
5628
/(?(?=a)a|b)/
 
5629
    a
 
5630
 0: a
 
5631
 
 
5632
/(?=(a+?))(\1ab)/
 
5633
    aaab
 
5634
 0: aab
 
5635
 1: a
 
5636
 2: aab
 
5637
 
 
5638
/^(?=(a+?))\1ab/
 
5639
 
 
5640
/(\w+:)+/
 
5641
    one:
 
5642
 0: one:
 
5643
 1: one:
 
5644
 
 
5645
/$(?<=^(a))/
 
5646
    a
 
5647
 0: 
 
5648
 1: a
 
5649
 
 
5650
/(?=(a+?))(\1ab)/
 
5651
    aaab
 
5652
 0: aab
 
5653
 1: a
 
5654
 2: aab
 
5655
 
 
5656
/^(?=(a+?))\1ab/
 
5657
    *** Failers
 
5658
No match
 
5659
    aaab
 
5660
No match
 
5661
    aaab
 
5662
No match
 
5663
 
 
5664
/([\w:]+::)?(\w+)$/
 
5665
    abcd
 
5666
 0: abcd
 
5667
 1: <unset>
 
5668
 2: abcd
 
5669
    xy:z:::abcd
 
5670
 0: xy:z:::abcd
 
5671
 1: xy:z:::
 
5672
 2: abcd
 
5673
 
 
5674
/^[^bcd]*(c+)/
 
5675
    aexycd
 
5676
 0: aexyc
 
5677
 1: c
 
5678
 
 
5679
/(a*)b+/
 
5680
    caab
 
5681
 0: aab
 
5682
 1: aa
 
5683
 
 
5684
/([\w:]+::)?(\w+)$/
 
5685
    abcd
 
5686
 0: abcd
 
5687
 1: <unset>
 
5688
 2: abcd
 
5689
    xy:z:::abcd
 
5690
 0: xy:z:::abcd
 
5691
 1: xy:z:::
 
5692
 2: abcd
 
5693
    *** Failers
 
5694
 0: Failers
 
5695
 1: <unset>
 
5696
 2: Failers
 
5697
    abcd:
 
5698
No match
 
5699
    abcd:
 
5700
No match
 
5701
 
 
5702
/^[^bcd]*(c+)/
 
5703
    aexycd
 
5704
 0: aexyc
 
5705
 1: c
 
5706
 
 
5707
/(>a+)ab/
 
5708
 
 
5709
/(?>a+)b/
 
5710
    aaab
 
5711
 0: aaab
 
5712
 
 
5713
/([[:]+)/
 
5714
    a:[b]:
 
5715
 0: :[
 
5716
 1: :[
 
5717
 
 
5718
/([[=]+)/
 
5719
    a=[b]=
 
5720
 0: =[
 
5721
 1: =[
 
5722
 
 
5723
/([[.]+)/
 
5724
    a.[b].
 
5725
 0: .[
 
5726
 1: .[
 
5727
 
 
5728
/((?>a+)b)/
 
5729
    aaab
 
5730
 0: aaab
 
5731
 1: aaab
 
5732
 
 
5733
/(?>(a+))b/
 
5734
    aaab
 
5735
 0: aaab
 
5736
 1: aaa
 
5737
 
 
5738
/((?>[^()]+)|\([^()]*\))+/
 
5739
    ((abc(ade)ufh()()x
 
5740
 0: abc(ade)ufh()()x
 
5741
 1: x
 
5742
 
 
5743
/a\Z/
 
5744
    *** Failers
 
5745
No match
 
5746
    aaab
 
5747
No match
 
5748
    a\nb\n
 
5749
No match
 
5750
 
 
5751
/b\Z/
 
5752
    a\nb\n
 
5753
 0: b
 
5754
 
 
5755
/b\z/
 
5756
 
 
5757
/b\Z/
 
5758
    a\nb
 
5759
 0: b
 
5760
 
 
5761
/b\z/
 
5762
    a\nb
 
5763
 0: b
 
5764
    *** Failers
 
5765
No match
 
5766
    
 
5767
/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
 
5768
    a
 
5769
 0: a
 
5770
 1: 
 
5771
    abc
 
5772
 0: abc
 
5773
 1: 
 
5774
    a-b
 
5775
 0: a-b
 
5776
 1: 
 
5777
    0-9 
 
5778
 0: 0-9
 
5779
 1: 
 
5780
    a.b
 
5781
 0: a.b
 
5782
 1: 
 
5783
    5.6.7  
 
5784
 0: 5.6.7
 
5785
 1: 
 
5786
    the.quick.brown.fox
 
5787
 0: the.quick.brown.fox
 
5788
 1: 
 
5789
    a100.b200.300c  
 
5790
 0: a100.b200.300c
 
5791
 1: 
 
5792
    12-ab.1245 
 
5793
 0: 12-ab.1245
 
5794
 1: 
 
5795
    *** Failers
 
5796
No match
 
5797
    \
 
5798
No match
 
5799
    .a
 
5800
No match
 
5801
    -a
 
5802
No match
 
5803
    a-
 
5804
No match
 
5805
    a.  
 
5806
No match
 
5807
    a_b 
 
5808
No match
 
5809
    a.-
 
5810
No match
 
5811
    a..  
 
5812
No match
 
5813
    ab..bc 
 
5814
No match
 
5815
    the.quick.brown.fox-
 
5816
No match
 
5817
    the.quick.brown.fox.
 
5818
No match
 
5819
    the.quick.brown.fox_
 
5820
No match
 
5821
    the.quick.brown.fox+       
 
5822
No match
 
5823
 
 
5824
/(?>.*)(?<=(abcd|wxyz))/
 
5825
    alphabetabcd
 
5826
 0: alphabetabcd
 
5827
 1: abcd
 
5828
    endingwxyz
 
5829
 0: endingwxyz
 
5830
 1: wxyz
 
5831
    *** Failers
 
5832
No match
 
5833
    a rather long string that doesn't end with one of them
 
5834
No match
 
5835
 
 
5836
/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
 
5837
    word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
5838
 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
5839
    word cat dog elephant mussel cow horse canary baboon snake shark
 
5840
No match
 
5841
  
 
5842
/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
 
5843
    word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
 
5844
No match
 
5845
 
 
5846
/(?<=\d{3}(?!999))foo/
 
5847
    999foo
 
5848
 0: foo
 
5849
    123999foo 
 
5850
 0: foo
 
5851
    *** Failers
 
5852
No match
 
5853
    123abcfoo
 
5854
No match
 
5855
    
 
5856
/(?<=(?!...999)\d{3})foo/
 
5857
    999foo
 
5858
 0: foo
 
5859
    123999foo 
 
5860
 0: foo
 
5861
    *** Failers
 
5862
No match
 
5863
    123abcfoo
 
5864
No match
 
5865
 
 
5866
/(?<=\d{3}(?!999)...)foo/
 
5867
    123abcfoo
 
5868
 0: foo
 
5869
    123456foo 
 
5870
 0: foo
 
5871
    *** Failers
 
5872
No match
 
5873
    123999foo  
 
5874
No match
 
5875
    
 
5876
/(?<=\d{3}...)(?<!999)foo/
 
5877
    123abcfoo   
 
5878
 0: foo
 
5879
    123456foo 
 
5880
 0: foo
 
5881
    *** Failers
 
5882
No match
 
5883
    123999foo  
 
5884
No match
 
5885
 
 
5886
/<a[\s]+href[\s]*=[\s]*          # find <a href=
 
5887
 ([\"\'])?                       # find single or double quote
 
5888
 (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
 
5889
                                 # quote, otherwise match up to next space
 
5890
/isx
 
5891
    <a href=abcd xyz
 
5892
 0: <a href=abcd
 
5893
 1: <unset>
 
5894
 2: <unset>
 
5895
 3: abcd
 
5896
    <a href=\"abcd xyz pqr\" cats
 
5897
 0: <a href="abcd xyz pqr"
 
5898
 1: "
 
5899
 2: abcd xyz pqr
 
5900
    <a href=\'abcd xyz pqr\' cats
 
5901
 0: <a href='abcd xyz pqr'
 
5902
 1: '
 
5903
 2: abcd xyz pqr
 
5904
 
 
5905
/<a\s+href\s*=\s*                # find <a href=
 
5906
 (["'])?                         # find single or double quote
 
5907
 (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
 
5908
                                 # quote, otherwise match up to next space
 
5909
/isx
 
5910
    <a href=abcd xyz
 
5911
 0: <a href=abcd
 
5912
 1: <unset>
 
5913
 2: <unset>
 
5914
 3: abcd
 
5915
    <a href=\"abcd xyz pqr\" cats
 
5916
 0: <a href="abcd xyz pqr"
 
5917
 1: "
 
5918
 2: abcd xyz pqr
 
5919
    <a href       =       \'abcd xyz pqr\' cats
 
5920
 0: <a href       =       'abcd xyz pqr'
 
5921
 1: '
 
5922
 2: abcd xyz pqr
 
5923
 
 
5924
/<a\s+href(?>\s*)=(?>\s*)        # find <a href=
 
5925
 (["'])?                         # find single or double quote
 
5926
 (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
 
5927
                                 # quote, otherwise match up to next space
 
5928
/isx
 
5929
    <a href=abcd xyz
 
5930
 0: <a href=abcd
 
5931
 1: <unset>
 
5932
 2: <unset>
 
5933
 3: abcd
 
5934
    <a href=\"abcd xyz pqr\" cats
 
5935
 0: <a href="abcd xyz pqr"
 
5936
 1: "
 
5937
 2: abcd xyz pqr
 
5938
    <a href       =       \'abcd xyz pqr\' cats
 
5939
 0: <a href       =       'abcd xyz pqr'
 
5940
 1: '
 
5941
 2: abcd xyz pqr
 
5942
 
 
5943
/((Z)+|A)*/
 
5944
    ZABCDEFG
 
5945
 0: ZA
 
5946
 1: A
 
5947
 2: Z
 
5948
 
 
5949
/(Z()|A)*/
 
5950
    ZABCDEFG
 
5951
 0: ZA
 
5952
 1: A
 
5953
 2: 
 
5954
 
 
5955
/(Z(())|A)*/
 
5956
    ZABCDEFG
 
5957
 0: ZA
 
5958
 1: A
 
5959
 2: 
 
5960
 3: 
 
5961
 
 
5962
/((?>Z)+|A)*/
 
5963
    ZABCDEFG
 
5964
 0: ZA
 
5965
 1: A
 
5966
 
 
5967
/((?>)+|A)*/
 
5968
    ZABCDEFG
 
5969
 0: 
 
5970
 1: 
 
5971
 
 
5972
/a*/g
 
5973
    abbab
 
5974
 0: a
 
5975
 0: 
 
5976
 0: 
 
5977
 0: a
 
5978
 0: 
 
5979
 0: 
 
5980
 
 
5981
/^[a-\d]/
 
5982
    abcde
 
5983
 0: a
 
5984
    -things
 
5985
 0: -
 
5986
    0digit
 
5987
 0: 0
 
5988
    *** Failers
 
5989
No match
 
5990
    bcdef    
 
5991
No match
 
5992
 
 
5993
/^[\d-a]/
 
5994
    abcde
 
5995
 0: a
 
5996
    -things
 
5997
 0: -
 
5998
    0digit
 
5999
 0: 0
 
6000
    *** Failers
 
6001
No match
 
6002
    bcdef    
 
6003
No match
 
6004
    
 
6005
/[[:space:]]+/
 
6006
    > \x09\x0a\x0c\x0d\x0b<
 
6007
 0:  \x09\x0a\x0c\x0d\x0b
 
6008
     
 
6009
/[[:blank:]]+/
 
6010
    > \x09\x0a\x0c\x0d\x0b<
 
6011
 0:  \x09
 
6012
     
 
6013
/[\s]+/
 
6014
    > \x09\x0a\x0c\x0d\x0b<
 
6015
 0:  \x09\x0a\x0c\x0d
 
6016
     
 
6017
/\s+/
 
6018
    > \x09\x0a\x0c\x0d\x0b<
 
6019
 0:  \x09\x0a\x0c\x0d
 
6020
     
 
6021
/a b/x
 
6022
    ab
 
6023
No match
 
6024
 
 
6025
/(?!\A)x/m
 
6026
  a\nxb\n
 
6027
 0: x
 
6028
 
 
6029
/(?!^)x/m
 
6030
  a\nxb\n
 
6031
No match
 
6032
 
 
6033
/abc\Qabc\Eabc/
 
6034
    abcabcabc
 
6035
 0: abcabcabc
 
6036
    
 
6037
/abc\Q(*+|\Eabc/
 
6038
    abc(*+|abc 
 
6039
 0: abc(*+|abc
 
6040
 
 
6041
/   abc\Q abc\Eabc/x
 
6042
    abc abcabc
 
6043
 0: abc abcabc
 
6044
    *** Failers
 
6045
No match
 
6046
    abcabcabc  
 
6047
No match
 
6048
    
 
6049
/abc#comment
 
6050
    \Q#not comment
 
6051
    literal\E/x
 
6052
    abc#not comment\n    literal     
 
6053
 0: abc#not comment\x0a    literal
 
6054
 
 
6055
/abc#comment
 
6056
    \Q#not comment
 
6057
    literal/x
 
6058
    abc#not comment\n    literal     
 
6059
 0: abc#not comment\x0a    literal
 
6060
 
 
6061
/abc#comment
 
6062
    \Q#not comment
 
6063
    literal\E #more comment
 
6064
    /x
 
6065
    abc#not comment\n    literal     
 
6066
 0: abc#not comment\x0a    literal
 
6067
 
 
6068
/abc#comment
 
6069
    \Q#not comment
 
6070
    literal\E #more comment/x
 
6071
    abc#not comment\n    literal     
 
6072
 0: abc#not comment\x0a    literal
 
6073
 
 
6074
/\Qabc\$xyz\E/
 
6075
    abc\\\$xyz
 
6076
 0: abc\$xyz
 
6077
 
 
6078
/\Qabc\E\$\Qxyz\E/
 
6079
    abc\$xyz
 
6080
 0: abc$xyz
 
6081
 
 
6082
/\Gabc/
 
6083
    abc
 
6084
 0: abc
 
6085
    *** Failers
 
6086
No match
 
6087
    xyzabc  
 
6088
No match
 
6089
 
 
6090
/\Gabc./g
 
6091
    abc1abc2xyzabc3
 
6092
 0: abc1
 
6093
 0: abc2
 
6094
 
 
6095
/abc./g
 
6096
    abc1abc2xyzabc3 
 
6097
 0: abc1
 
6098
 0: abc2
 
6099
 0: abc3
 
6100
 
 
6101
/a(?x: b c )d/
 
6102
    XabcdY
 
6103
 0: abcd
 
6104
    *** Failers 
 
6105
No match
 
6106
    Xa b c d Y 
 
6107
No match
 
6108
 
 
6109
/((?x)x y z | a b c)/
 
6110
    XabcY
 
6111
 0: abc
 
6112
 1: abc
 
6113
    AxyzB 
 
6114
 0: xyz
 
6115
 1: xyz
 
6116
 
 
6117
/(?i)AB(?-i)C/
 
6118
    XabCY
 
6119
 0: abC
 
6120
    *** Failers
 
6121
No match
 
6122
    XabcY  
 
6123
No match
 
6124
 
 
6125
/((?i)AB(?-i)C|D)E/
 
6126
    abCE
 
6127
 0: abCE
 
6128
 1: abC
 
6129
    DE
 
6130
 0: DE
 
6131
 1: D
 
6132
    *** Failers
 
6133
No match
 
6134
    abcE
 
6135
No match
 
6136
    abCe  
 
6137
No match
 
6138
    dE
 
6139
No match
 
6140
    De    
 
6141
No match
 
6142
 
 
6143
/(.*)\d+\1/
 
6144
    abc123abc
 
6145
 0: abc123abc
 
6146
 1: abc
 
6147
    abc123bc 
 
6148
 0: bc123bc
 
6149
 1: bc
 
6150
 
 
6151
/(.*)\d+\1/s
 
6152
    abc123abc
 
6153
 0: abc123abc
 
6154
 1: abc
 
6155
    abc123bc 
 
6156
 0: bc123bc
 
6157
 1: bc
 
6158
    
 
6159
/((.*))\d+\1/
 
6160
    abc123abc
 
6161
 0: abc123abc
 
6162
 1: abc
 
6163
 2: abc
 
6164
    abc123bc  
 
6165
 0: bc123bc
 
6166
 1: bc
 
6167
 2: bc
 
6168
 
 
6169
/-- This tests for an IPv6 address in the form where it can have up to --/
 
6170
/-- eight components, one and only one of which is empty. This must be --/
 
6171
No match
 
6172
/-- an internal component. --/
 
6173
No match
 
6174
 
 
6175
/^(?!:)                       # colon disallowed at start
 
6176
  (?:                         # start of item
 
6177
    (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
 
6178
    (?(1)0 | () ) )           # if null previously matched, fail; else null
 
6179
    :                         # followed by colon
 
6180
  ){1,7}                      # end item; 1-7 of them required               
 
6181
  [0-9a-f]{1,4} $             # final hex number at end of string
 
6182
  (?(1)|.)                    # check that there was an empty component
 
6183
  /xi
 
6184
    a123::a123
 
6185
 0: a123::a123
 
6186
 1: 
 
6187
    a123:b342::abcd
 
6188
 0: a123:b342::abcd
 
6189
 1: 
 
6190
    a123:b342::324e:abcd
 
6191
 0: a123:b342::324e:abcd
 
6192
 1: 
 
6193
    a123:ddde:b342::324e:abcd
 
6194
 0: a123:ddde:b342::324e:abcd
 
6195
 1: 
 
6196
    a123:ddde:b342::324e:dcba:abcd
 
6197
 0: a123:ddde:b342::324e:dcba:abcd
 
6198
 1: 
 
6199
    a123:ddde:9999:b342::324e:dcba:abcd
 
6200
 0: a123:ddde:9999:b342::324e:dcba:abcd
 
6201
 1: 
 
6202
    *** Failers
 
6203
No match
 
6204
    1:2:3:4:5:6:7:8
 
6205
No match
 
6206
    a123:bce:ddde:9999:b342::324e:dcba:abcd
 
6207
No match
 
6208
    a123::9999:b342::324e:dcba:abcd
 
6209
No match
 
6210
    abcde:2:3:4:5:6:7:8
 
6211
No match
 
6212
    ::1
 
6213
No match
 
6214
    abcd:fee0:123::   
 
6215
No match
 
6216
    :1
 
6217
No match
 
6218
    1:  
 
6219
No match
 
6220
 
 
6221
/[z\Qa-d]\E]/
 
6222
    z
 
6223
 0: z
 
6224
    a
 
6225
 0: a
 
6226
    -
 
6227
 0: -
 
6228
    d
 
6229
 0: d
 
6230
    ] 
 
6231
 0: ]
 
6232
    *** Failers
 
6233
 0: a
 
6234
    b     
 
6235
No match
 
6236
 
 
6237
/[\z\C]/
 
6238
    z
 
6239
 0: z
 
6240
    C 
 
6241
 0: C
 
6242
    
 
6243
/\M/
 
6244
    M 
 
6245
 0: M
 
6246
    
 
6247
/(a+)*b/
 
6248
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
 
6249
No match
 
6250
    
 
6251
/(?i)reg(?:ul(?:[a�]|ae)r|ex)/
 
6252
    REGular
 
6253
 0: REGular
 
6254
    regulaer
 
6255
 0: regulaer
 
6256
    Regex  
 
6257
 0: Regex
 
6258
    regul�r 
 
6259
 0: regul\xe4r
 
6260
 
 
6261
/����[�-��-�]+/
 
6262
    �����
 
6263
 0: \xc5\xe6\xe5\xe4\xe0
 
6264
    �����
 
6265
 0: \xc5\xe6\xe5\xe4\xff
 
6266
    �����
 
6267
 0: \xc5\xe6\xe5\xe4\xc0
 
6268
    �����
 
6269
 0: \xc5\xe6\xe5\xe4\xdf
 
6270
 
 
6271
/(?<=Z)X./
 
6272
  \x84XAZXB
 
6273
 0: XB
 
6274
 
 
6275
/ End of testinput1 /