~ubuntu-branches/ubuntu/vivid/ssed/vivid

« back to all changes in this revision

Viewing changes to testsuite/pcre1.good

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2004-03-23 16:45:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040323164536-r0jrs8udv1ftwoac
Tags: upstream-3.60
ImportĀ upstreamĀ versionĀ 3.60

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/the quick brown fox/
 
2
    the quick brown fox
 
3
 0: the quick brown fox
 
4
    What do you know about the quick brown fox?
 
5
 0: the quick brown fox
 
6
    *** Failers
 
7
No match
 
8
    The quick brown FOX
 
9
No match
 
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
/b*c*b+/
 
349
    bbbb
 
350
 0: bbbb
 
351
 
 
352
/^xxx[0-9]+$/
 
353
    xxx0
 
354
 0: xxx0
 
355
    xxx1234
 
356
 0: xxx1234
 
357
    *** Failers
 
358
No match
 
359
    xxx
 
360
No match
 
361
 
 
362
/^.+[0-9][0-9][0-9]$/
 
363
    x123
 
364
 0: x123
 
365
    xx123
 
366
 0: xx123
 
367
    123456
 
368
 0: 123456
 
369
    *** Failers
 
370
No match
 
371
    123
 
372
No match
 
373
    x1234
 
374
 0: x1234
 
375
 
 
376
/^.+?[0-9][0-9][0-9]$/
 
377
    x123
 
378
 0: x123
 
379
    xx123
 
380
 0: xx123
 
381
    123456
 
382
 0: 123456
 
383
    *** Failers
 
384
No match
 
385
    123
 
386
No match
 
387
    x1234
 
388
 0: x1234
 
389
 
 
390
/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
 
391
    abc!pqr=apquxz.ixr.zzz.ac.uk
 
392
 0: abc!pqr=apquxz.ixr.zzz.ac.uk
 
393
 1: abc
 
394
 2: pqr
 
395
    *** Failers
 
396
No match
 
397
    !pqr=apquxz.ixr.zzz.ac.uk
 
398
No match
 
399
    abc!=apquxz.ixr.zzz.ac.uk
 
400
No match
 
401
    abc!pqr=apquxz:ixr.zzz.ac.uk
 
402
No match
 
403
    abc!pqr=apquxz.ixr.zzz.ac.ukk
 
404
No match
 
405
 
 
406
/:/
 
407
    Well, we need a colon: somewhere
 
408
 0: :
 
409
    *** Failers
 
410
No match
 
411
    Fail if we don't
 
412
No match
 
413
 
 
414
/([\da-f:]+)$/i
 
415
    0abc
 
416
 0: 0abc
 
417
 1: 0abc
 
418
    abc
 
419
 0: abc
 
420
 1: abc
 
421
    fed
 
422
 0: fed
 
423
 1: fed
 
424
    E
 
425
 0: E
 
426
 1: E
 
427
    ::
 
428
 0: ::
 
429
 1: ::
 
430
    5f03:12C0::932e
 
431
 0: 5f03:12C0::932e
 
432
 1: 5f03:12C0::932e
 
433
    fed def
 
434
 0: def
 
435
 1: def
 
436
    Any old stuff
 
437
 0: ff
 
438
 1: ff
 
439
    *** Failers
 
440
No match
 
441
    0zzz
 
442
No match
 
443
    gzzz
 
444
No match
 
445
    fed\x20
 
446
No match
 
447
    Any old rubbish
 
448
No match
 
449
 
 
450
/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
 
451
    .1.2.3
 
452
 0: .1.2.3
 
453
 1: 1
 
454
 2: 2
 
455
 3: 3
 
456
    A.12.123.0
 
457
 0: A.12.123.0
 
458
 1: 12
 
459
 2: 123
 
460
 3: 0
 
461
    *** Failers
 
462
No match
 
463
    .1.2.3333
 
464
No match
 
465
    1.2.3
 
466
No match
 
467
    1234.2.3
 
468
No match
 
469
 
 
470
/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
 
471
    1 IN SOA non-sp1 non-sp2(
 
472
 0: 1 IN SOA non-sp1 non-sp2(
 
473
 1: 1
 
474
 2: non-sp1
 
475
 3: non-sp2
 
476
    1    IN    SOA    non-sp1    non-sp2   (
 
477
 0: 1    IN    SOA    non-sp1    non-sp2   (
 
478
 1: 1
 
479
 2: non-sp1
 
480
 3: non-sp2
 
481
    *** Failers
 
482
No match
 
483
    1IN SOA non-sp1 non-sp2(
 
484
No match
 
485
 
 
486
/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
 
487
    a.
 
488
 0: a.
 
489
    Z.
 
490
 0: Z.
 
491
    2.
 
492
 0: 2.
 
493
    ab-c.pq-r.
 
494
 0: ab-c.pq-r.
 
495
 1: .pq-r
 
496
    sxk.zzz.ac.uk.
 
497
 0: sxk.zzz.ac.uk.
 
498
 1: .uk
 
499
    x-.y-.
 
500
 0: x-.y-.
 
501
 1: .y-
 
502
    *** Failers
 
503
No match
 
504
    -abc.peq.
 
505
No match
 
506
 
 
507
/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
 
508
    *.a
 
509
 0: *.a
 
510
    *.b0-a
 
511
 0: *.b0-a
 
512
 1: 0-a
 
513
    *.c3-b.c
 
514
 0: *.c3-b.c
 
515
 1: 3-b
 
516
 2: .c
 
517
    *.c-a.b-c
 
518
 0: *.c-a.b-c
 
519
 1: -a
 
520
 2: .b-c
 
521
 3: -c
 
522
    *** Failers
 
523
No match
 
524
    *.0
 
525
No match
 
526
    *.a-
 
527
No match
 
528
    *.a-b.c-
 
529
No match
 
530
    *.c-a.0-c
 
531
No match
 
532
 
 
533
/^(?=ab(de))(abd)(e)/
 
534
    abde
 
535
 0: abde
 
536
 1: de
 
537
 2: abd
 
538
 3: e
 
539
 
 
540
/^(?!(ab)de|x)(abd)(f)/
 
541
    abdf
 
542
 0: abdf
 
543
 1: <unset>
 
544
 2: abd
 
545
 3: f
 
546
 
 
547
/^(?=(ab(cd)))(ab)/
 
548
    abcd
 
549
 0: ab
 
550
 1: abcd
 
551
 2: cd
 
552
 3: ab
 
553
 
 
554
/^[\da-f](\.[\da-f])*$/i
 
555
    a.b.c.d
 
556
 0: a.b.c.d
 
557
 1: .d
 
558
    A.B.C.D
 
559
 0: A.B.C.D
 
560
 1: .D
 
561
    a.b.c.1.2.3.C
 
562
 0: a.b.c.1.2.3.C
 
563
 1: .C
 
564
 
 
565
/^\".*\"\s*(;.*)?$/
 
566
    \"1234\"
 
567
 0: "1234"
 
568
    \"abcd\" ;
 
569
 0: "abcd" ;
 
570
 1: ;
 
571
    \"\" ; rhubarb
 
572
 0: "" ; rhubarb
 
573
 1: ; rhubarb
 
574
    *** Failers
 
575
No match
 
576
    \"1234\" : things
 
577
No match
 
578
 
 
579
/^$/
 
580
    \
 
581
 0: 
 
582
    *** Failers
 
583
No match
 
584
 
 
585
/   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
 
586
    ab c
 
587
 0: ab c
 
588
    *** Failers
 
589
No match
 
590
    abc
 
591
No match
 
592
    ab cde
 
593
No match
 
594
 
 
595
/(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
 
596
    ab c
 
597
 0: ab c
 
598
    *** Failers
 
599
No match
 
600
    abc
 
601
No match
 
602
    ab cde
 
603
No match
 
604
 
 
605
/^   a\ b[c ]d       $/x
 
606
    a bcd
 
607
 0: a bcd
 
608
    a b d
 
609
 0: a b d
 
610
    *** Failers
 
611
No match
 
612
    abcd
 
613
No match
 
614
    ab d
 
615
No match
 
616
 
 
617
/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
 
618
    abcdefhijklm
 
619
 0: abcdefhijklm
 
620
 1: abc
 
621
 2: bc
 
622
 3: c
 
623
 4: def
 
624
 5: ef
 
625
 6: f
 
626
 7: hij
 
627
 8: ij
 
628
 9: j
 
629
10: klm
 
630
11: lm
 
631
12: m
 
632
 
 
633
/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
 
634
    abcdefhijklm
 
635
 0: abcdefhijklm
 
636
 1: bc
 
637
 2: c
 
638
 3: ef
 
639
 4: f
 
640
 5: ij
 
641
 6: j
 
642
 7: lm
 
643
 8: m
 
644
 
 
645
/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
 
646
    a+ Z0+\x08\n\x1d\x12
 
647
 0: a+ Z0+\x08\x0a\x1d\x12
 
648
 
 
649
/^[.^$|()*+?{,}]+/
 
650
    .^\$(*+)|{?,?}
 
651
 0: .^$(*+)|{?,?}
 
652
 
 
653
/^a*\w/
 
654
    z
 
655
 0: z
 
656
    az
 
657
 0: az
 
658
    aaaz
 
659
 0: aaaz
 
660
    a
 
661
 0: a
 
662
    aa
 
663
 0: aa
 
664
    aaaa
 
665
 0: aaaa
 
666
    a+
 
667
 0: a
 
668
    aa+
 
669
 0: aa
 
670
 
 
671
/^a*?\w/
 
672
    z
 
673
 0: z
 
674
    az
 
675
 0: a
 
676
    aaaz
 
677
 0: a
 
678
    a
 
679
 0: a
 
680
    aa
 
681
 0: a
 
682
    aaaa
 
683
 0: a
 
684
    a+
 
685
 0: a
 
686
    aa+
 
687
 0: a
 
688
 
 
689
/^a+\w/
 
690
    az
 
691
 0: az
 
692
    aaaz
 
693
 0: aaaz
 
694
    aa
 
695
 0: aa
 
696
    aaaa
 
697
 0: aaaa
 
698
    aa+
 
699
 0: aa
 
700
 
 
701
/^a+?\w/
 
702
    az
 
703
 0: az
 
704
    aaaz
 
705
 0: aa
 
706
    aa
 
707
 0: aa
 
708
    aaaa
 
709
 0: aa
 
710
    aa+
 
711
 0: aa
 
712
 
 
713
/^\d{8}\w{2,}/
 
714
    1234567890
 
715
 0: 1234567890
 
716
    12345678ab
 
717
 0: 12345678ab
 
718
    12345678__
 
719
 0: 12345678__
 
720
    *** Failers
 
721
No match
 
722
    1234567
 
723
No match
 
724
 
 
725
/^[aeiou\d]{4,5}$/
 
726
    uoie
 
727
 0: uoie
 
728
    1234
 
729
 0: 1234
 
730
    12345
 
731
 0: 12345
 
732
    aaaaa
 
733
 0: aaaaa
 
734
    *** Failers
 
735
No match
 
736
    123456
 
737
No match
 
738
 
 
739
/^[aeiou\d]{4,5}?/
 
740
    uoie
 
741
 0: uoie
 
742
    1234
 
743
 0: 1234
 
744
    12345
 
745
 0: 1234
 
746
    aaaaa
 
747
 0: aaaa
 
748
    123456
 
749
 0: 1234
 
750
 
 
751
/\A(abc|def)=(\1){2,3}\Z/
 
752
    abc=abcabc
 
753
 0: abc=abcabc
 
754
 1: abc
 
755
 2: abc
 
756
    def=defdefdef
 
757
 0: def=defdefdef
 
758
 1: def
 
759
 2: def
 
760
    *** Failers
 
761
No match
 
762
    abc=defdef
 
763
No match
 
764
 
 
765
/^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
 
766
    abcdefghijkcda2
 
767
 0: abcdefghijkcda2
 
768
 1: a
 
769
 2: b
 
770
 3: c
 
771
 4: d
 
772
 5: e
 
773
 6: f
 
774
 7: g
 
775
 8: h
 
776
 9: i
 
777
10: j
 
778
11: k
 
779
12: cd
 
780
    abcdefghijkkkkcda2
 
781
 0: abcdefghijkkkkcda2
 
782
 1: a
 
783
 2: b
 
784
 3: c
 
785
 4: d
 
786
 5: e
 
787
 6: f
 
788
 7: g
 
789
 8: h
 
790
 9: i
 
791
10: j
 
792
11: k
 
793
12: cd
 
794
 
 
795
/(cat(a(ract|tonic)|erpillar)) \1()2(3)/
 
796
    cataract cataract23
 
797
 0: cataract cataract23
 
798
 1: cataract
 
799
 2: aract
 
800
 3: ract
 
801
 4: 
 
802
 5: 3
 
803
    catatonic catatonic23
 
804
 0: catatonic catatonic23
 
805
 1: catatonic
 
806
 2: atonic
 
807
 3: tonic
 
808
 4: 
 
809
 5: 3
 
810
    caterpillar caterpillar23
 
811
 0: caterpillar caterpillar23
 
812
 1: caterpillar
 
813
 2: erpillar
 
814
 3: <unset>
 
815
 4: 
 
816
 5: 3
 
817
 
 
818
 
 
819
/^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]/
 
820
    From abcd  Mon Sep 01 12:33:02 1997
 
821
 0: From abcd  Mon Sep 01 12:33
 
822
 1: abcd
 
823
 
 
824
/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
 
825
    From abcd  Mon Sep 01 12:33:02 1997
 
826
 0: From abcd  Mon Sep 01 12:33
 
827
 1: Sep 
 
828
    From abcd  Mon Sep  1 12:33:02 1997
 
829
 0: From abcd  Mon Sep  1 12:33
 
830
 1: Sep  
 
831
    *** Failers
 
832
No match
 
833
    From abcd  Sep 01 12:33:02 1997
 
834
No match
 
835
 
 
836
/^12.34/s
 
837
    12\n34
 
838
 0: 12\x0a34
 
839
    12\r34
 
840
 0: 12\x0d34
 
841
 
 
842
/\w+(?=\t)/
 
843
    the quick brown\t fox
 
844
 0: brown
 
845
 
 
846
/foo(?!bar)(.*)/
 
847
    foobar is foolish see?
 
848
 0: foolish see?
 
849
 1: lish see?
 
850
 
 
851
/(?:(?!foo)...|^.{0,2})bar(.*)/
 
852
    foobar crowbar etc
 
853
 0: rowbar etc
 
854
 1:  etc
 
855
    barrel
 
856
 0: barrel
 
857
 1: rel
 
858
    2barrel
 
859
 0: 2barrel
 
860
 1: rel
 
861
    A barrel
 
862
 0: A barrel
 
863
 1: rel
 
864
 
 
865
/^(\D*)(?=\d)(?!123)/
 
866
    abc456
 
867
 0: abc
 
868
 1: abc
 
869
    *** Failers
 
870
No match
 
871
    abc123
 
872
No match
 
873
 
 
874
/^1234(?# test newlines
 
875
  inside)/
 
876
    1234
 
877
 0: 1234
 
878
 
 
879
/^1234 #comment in extended re
 
880
  /x
 
881
    1234
 
882
 0: 1234
 
883
 
 
884
/#rhubarb
 
885
  abcd/x
 
886
    abcd
 
887
 0: abcd
 
888
 
 
889
/^abcd#rhubarb/x
 
890
    abcd
 
891
 0: abcd
 
892
 
 
893
/^(a)\1{2,3}(.)/
 
894
    aaab
 
895
 0: aaab
 
896
 1: a
 
897
 2: b
 
898
    aaaab
 
899
 0: aaaab
 
900
 1: a
 
901
 2: b
 
902
    aaaaab
 
903
 0: aaaaa
 
904
 1: a
 
905
 2: a
 
906
    aaaaaab
 
907
 0: aaaaa
 
908
 1: a
 
909
 2: a
 
910
 
 
911
/(?!^)abc/
 
912
    the abc
 
913
 0: abc
 
914
    *** Failers
 
915
No match
 
916
    abc
 
917
No match
 
918
 
 
919
/(?=^)abc/
 
920
    abc
 
921
 0: abc
 
922
    *** Failers
 
923
No match
 
924
    the abc
 
925
No match
 
926
 
 
927
/^[ab]{1,3}(ab*|b)/
 
928
    aabbbbb
 
929
 0: aabb
 
930
 1: b
 
931
 
 
932
/^[ab]{1,3}?(ab*|b)/
 
933
    aabbbbb
 
934
 0: aabbbbb
 
935
 1: abbbbb
 
936
 
 
937
/^[ab]{1,3}?(ab*?|b)/
 
938
    aabbbbb
 
939
 0: aa
 
940
 1: a
 
941
 
 
942
/^[ab]{1,3}(ab*?|b)/
 
943
    aabbbbb
 
944
 0: aabb
 
945
 1: b
 
946
 
 
947
/  (?: [\040\t] |  \(
 
948
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
949
\)  )*                          # optional leading comment
 
950
(?:    (?:
 
951
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
952
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
953
|
 
954
" (?:                      # opening quote...
 
955
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
956
|                     #    or
 
957
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
958
)* "  # closing quote
 
959
)                    # initial word
 
960
(?:  (?: [\040\t] |  \(
 
961
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
962
\)  )*  \.  (?: [\040\t] |  \(
 
963
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
964
\)  )*   (?:
 
965
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
966
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
967
|
 
968
" (?:                      # opening quote...
 
969
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
970
|                     #    or
 
971
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
972
)* "  # closing quote
 
973
)  )* # further okay, if led by a period
 
974
(?: [\040\t] |  \(
 
975
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
976
\)  )*  @  (?: [\040\t] |  \(
 
977
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
978
\)  )*    (?:
 
979
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
980
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
981
|   \[                         # [
 
982
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
983
\]                        #           ]
 
984
)                           # initial subdomain
 
985
(?:                                  #
 
986
(?: [\040\t] |  \(
 
987
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
988
\)  )*  \.                        # if led by a period...
 
989
(?: [\040\t] |  \(
 
990
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
991
\)  )*   (?:
 
992
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
993
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
994
|   \[                         # [
 
995
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
996
\]                        #           ]
 
997
)                     #   ...further okay
 
998
)*
 
999
# address
 
1000
|                     #  or
 
1001
(?:
 
1002
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1003
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1004
|
 
1005
" (?:                      # opening quote...
 
1006
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1007
|                     #    or
 
1008
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1009
)* "  # closing quote
 
1010
)             # one word, optionally followed by....
 
1011
(?:
 
1012
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
 
1013
\(
 
1014
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1015
\)       |  # comments, or...
 
1016
 
 
1017
" (?:                      # opening quote...
 
1018
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1019
|                     #    or
 
1020
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1021
)* "  # closing quote
 
1022
# quoted strings
 
1023
)*
 
1024
<  (?: [\040\t] |  \(
 
1025
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1026
\)  )*                     # leading <
 
1027
(?:  @  (?: [\040\t] |  \(
 
1028
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1029
\)  )*    (?:
 
1030
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1031
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1032
|   \[                         # [
 
1033
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1034
\]                        #           ]
 
1035
)                           # initial subdomain
 
1036
(?:                                  #
 
1037
(?: [\040\t] |  \(
 
1038
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1039
\)  )*  \.                        # if led by a period...
 
1040
(?: [\040\t] |  \(
 
1041
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1042
\)  )*   (?:
 
1043
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1044
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1045
|   \[                         # [
 
1046
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1047
\]                        #           ]
 
1048
)                     #   ...further okay
 
1049
)*
 
1050
 
 
1051
(?:  (?: [\040\t] |  \(
 
1052
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1053
\)  )*  ,  (?: [\040\t] |  \(
 
1054
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1055
\)  )*  @  (?: [\040\t] |  \(
 
1056
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1057
\)  )*    (?:
 
1058
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1059
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1060
|   \[                         # [
 
1061
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1062
\]                        #           ]
 
1063
)                           # initial subdomain
 
1064
(?:                                  #
 
1065
(?: [\040\t] |  \(
 
1066
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1067
\)  )*  \.                        # if led by a period...
 
1068
(?: [\040\t] |  \(
 
1069
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1070
\)  )*   (?:
 
1071
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1072
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1073
|   \[                         # [
 
1074
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1075
\]                        #           ]
 
1076
)                     #   ...further okay
 
1077
)*
 
1078
)* # further okay, if led by comma
 
1079
:                                # closing colon
 
1080
(?: [\040\t] |  \(
 
1081
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1082
\)  )*  )? #       optional route
 
1083
(?:
 
1084
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1085
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1086
|
 
1087
" (?:                      # opening quote...
 
1088
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1089
|                     #    or
 
1090
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1091
)* "  # closing quote
 
1092
)                    # initial word
 
1093
(?:  (?: [\040\t] |  \(
 
1094
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1095
\)  )*  \.  (?: [\040\t] |  \(
 
1096
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1097
\)  )*   (?:
 
1098
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1099
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1100
|
 
1101
" (?:                      # opening quote...
 
1102
[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 
1103
|                     #    or
 
1104
\\ [^\x80-\xff]           #   Escaped something (something != CR)
 
1105
)* "  # closing quote
 
1106
)  )* # further okay, if led by a period
 
1107
(?: [\040\t] |  \(
 
1108
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1109
\)  )*  @  (?: [\040\t] |  \(
 
1110
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1111
\)  )*    (?:
 
1112
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1113
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1114
|   \[                         # [
 
1115
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1116
\]                        #           ]
 
1117
)                           # initial subdomain
 
1118
(?:                                  #
 
1119
(?: [\040\t] |  \(
 
1120
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1121
\)  )*  \.                        # if led by a period...
 
1122
(?: [\040\t] |  \(
 
1123
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1124
\)  )*   (?:
 
1125
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1126
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1127
|   \[                         # [
 
1128
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 
1129
\]                        #           ]
 
1130
)                     #   ...further okay
 
1131
)*
 
1132
#       address spec
 
1133
(?: [\040\t] |  \(
 
1134
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1135
\)  )*  > #                  trailing >
 
1136
# name and address
 
1137
)  (?: [\040\t] |  \(
 
1138
(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 
1139
\)  )*                       # optional trailing comment
 
1140
/x
 
1141
    Alan Other <user\@dom.ain>
 
1142
 0: Alan Other <user@dom.ain>
 
1143
    <user\@dom.ain>
 
1144
 0: user@dom.ain
 
1145
    user\@dom.ain
 
1146
 0: user@dom.ain
 
1147
    \"A. Other\" <user.1234\@dom.ain> (a comment)
 
1148
 0: "A. Other" <user.1234@dom.ain> (a comment)
 
1149
    A. Other <user.1234\@dom.ain> (a comment)
 
1150
 0:  Other <user.1234@dom.ain> (a comment)
 
1151
    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
 
1152
 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
 
1153
    A missing angle <user\@some.where
 
1154
 0: user@some.where
 
1155
    *** Failers
 
1156
No match
 
1157
    The quick brown fox
 
1158
No match
 
1159
 
 
1160
/[\040\t]*                    # Nab whitespace.
 
1161
(?:
 
1162
\(                              #  (
 
1163
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1164
(?:                                 #       (
 
1165
(?:  \\ [^\x80-\xff]  |
 
1166
\(                            #  (
 
1167
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1168
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1169
\)                           #                       )
 
1170
)    #         special
 
1171
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1172
)*                                  #            )*
 
1173
\)                             #                )
 
1174
[\040\t]* )*    # If comment found, allow more spaces.
 
1175
# optional leading comment
 
1176
(?:
 
1177
(?:
 
1178
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1179
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1180
# Atom
 
1181
|                       #  or
 
1182
"                                     # "
 
1183
[^\\\x80-\xff\n\015"] *                            #   normal
 
1184
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1185
"                                     #        "
 
1186
# Quoted string
 
1187
)
 
1188
[\040\t]*                    # Nab whitespace.
 
1189
(?:
 
1190
\(                              #  (
 
1191
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1192
(?:                                 #       (
 
1193
(?:  \\ [^\x80-\xff]  |
 
1194
\(                            #  (
 
1195
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1196
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1197
\)                           #                       )
 
1198
)    #         special
 
1199
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1200
)*                                  #            )*
 
1201
\)                             #                )
 
1202
[\040\t]* )*    # If comment found, allow more spaces.
 
1203
(?:
 
1204
\.
 
1205
[\040\t]*                    # Nab whitespace.
 
1206
(?:
 
1207
\(                              #  (
 
1208
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1209
(?:                                 #       (
 
1210
(?:  \\ [^\x80-\xff]  |
 
1211
\(                            #  (
 
1212
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1213
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1214
\)                           #                       )
 
1215
)    #         special
 
1216
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1217
)*                                  #            )*
 
1218
\)                             #                )
 
1219
[\040\t]* )*    # If comment found, allow more spaces.
 
1220
(?:
 
1221
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1222
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1223
# Atom
 
1224
|                       #  or
 
1225
"                                     # "
 
1226
[^\\\x80-\xff\n\015"] *                            #   normal
 
1227
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1228
"                                     #        "
 
1229
# Quoted string
 
1230
)
 
1231
[\040\t]*                    # Nab whitespace.
 
1232
(?:
 
1233
\(                              #  (
 
1234
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1235
(?:                                 #       (
 
1236
(?:  \\ [^\x80-\xff]  |
 
1237
\(                            #  (
 
1238
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1239
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1240
\)                           #                       )
 
1241
)    #         special
 
1242
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1243
)*                                  #            )*
 
1244
\)                             #                )
 
1245
[\040\t]* )*    # If comment found, allow more spaces.
 
1246
# additional words
 
1247
)*
 
1248
@
 
1249
[\040\t]*                    # Nab whitespace.
 
1250
(?:
 
1251
\(                              #  (
 
1252
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1253
(?:                                 #       (
 
1254
(?:  \\ [^\x80-\xff]  |
 
1255
\(                            #  (
 
1256
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1257
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1258
\)                           #                       )
 
1259
)    #         special
 
1260
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1261
)*                                  #            )*
 
1262
\)                             #                )
 
1263
[\040\t]* )*    # If comment found, allow more spaces.
 
1264
(?:
 
1265
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1266
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1267
|
 
1268
\[                            # [
 
1269
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1270
\]                           #           ]
 
1271
)
 
1272
[\040\t]*                    # Nab whitespace.
 
1273
(?:
 
1274
\(                              #  (
 
1275
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1276
(?:                                 #       (
 
1277
(?:  \\ [^\x80-\xff]  |
 
1278
\(                            #  (
 
1279
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1280
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1281
\)                           #                       )
 
1282
)    #         special
 
1283
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1284
)*                                  #            )*
 
1285
\)                             #                )
 
1286
[\040\t]* )*    # If comment found, allow more spaces.
 
1287
# optional trailing comments
 
1288
(?:
 
1289
\.
 
1290
[\040\t]*                    # Nab whitespace.
 
1291
(?:
 
1292
\(                              #  (
 
1293
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1294
(?:                                 #       (
 
1295
(?:  \\ [^\x80-\xff]  |
 
1296
\(                            #  (
 
1297
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1298
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1299
\)                           #                       )
 
1300
)    #         special
 
1301
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1302
)*                                  #            )*
 
1303
\)                             #                )
 
1304
[\040\t]* )*    # If comment found, allow more spaces.
 
1305
(?:
 
1306
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1307
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1308
|
 
1309
\[                            # [
 
1310
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1311
\]                           #           ]
 
1312
)
 
1313
[\040\t]*                    # Nab whitespace.
 
1314
(?:
 
1315
\(                              #  (
 
1316
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1317
(?:                                 #       (
 
1318
(?:  \\ [^\x80-\xff]  |
 
1319
\(                            #  (
 
1320
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1321
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1322
\)                           #                       )
 
1323
)    #         special
 
1324
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1325
)*                                  #            )*
 
1326
\)                             #                )
 
1327
[\040\t]* )*    # If comment found, allow more spaces.
 
1328
# optional trailing comments
 
1329
)*
 
1330
# address
 
1331
|                             #  or
 
1332
(?:
 
1333
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1334
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1335
# Atom
 
1336
|                       #  or
 
1337
"                                     # "
 
1338
[^\\\x80-\xff\n\015"] *                            #   normal
 
1339
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1340
"                                     #        "
 
1341
# Quoted string
 
1342
)
 
1343
# leading word
 
1344
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
 
1345
(?:
 
1346
(?:
 
1347
\(                              #  (
 
1348
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1349
(?:                                 #       (
 
1350
(?:  \\ [^\x80-\xff]  |
 
1351
\(                            #  (
 
1352
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1353
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1354
\)                           #                       )
 
1355
)    #         special
 
1356
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1357
)*                                  #            )*
 
1358
\)                             #                )
 
1359
|
 
1360
"                                     # "
 
1361
[^\\\x80-\xff\n\015"] *                            #   normal
 
1362
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1363
"                                     #        "
 
1364
) # "special" comment or quoted string
 
1365
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
 
1366
)*
 
1367
<
 
1368
[\040\t]*                    # Nab whitespace.
 
1369
(?:
 
1370
\(                              #  (
 
1371
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1372
(?:                                 #       (
 
1373
(?:  \\ [^\x80-\xff]  |
 
1374
\(                            #  (
 
1375
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1376
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1377
\)                           #                       )
 
1378
)    #         special
 
1379
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1380
)*                                  #            )*
 
1381
\)                             #                )
 
1382
[\040\t]* )*    # If comment found, allow more spaces.
 
1383
# <
 
1384
(?:
 
1385
@
 
1386
[\040\t]*                    # Nab whitespace.
 
1387
(?:
 
1388
\(                              #  (
 
1389
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1390
(?:                                 #       (
 
1391
(?:  \\ [^\x80-\xff]  |
 
1392
\(                            #  (
 
1393
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1394
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1395
\)                           #                       )
 
1396
)    #         special
 
1397
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1398
)*                                  #            )*
 
1399
\)                             #                )
 
1400
[\040\t]* )*    # If comment found, allow more spaces.
 
1401
(?:
 
1402
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1403
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1404
|
 
1405
\[                            # [
 
1406
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1407
\]                           #           ]
 
1408
)
 
1409
[\040\t]*                    # Nab whitespace.
 
1410
(?:
 
1411
\(                              #  (
 
1412
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1413
(?:                                 #       (
 
1414
(?:  \\ [^\x80-\xff]  |
 
1415
\(                            #  (
 
1416
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1417
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1418
\)                           #                       )
 
1419
)    #         special
 
1420
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1421
)*                                  #            )*
 
1422
\)                             #                )
 
1423
[\040\t]* )*    # If comment found, allow more spaces.
 
1424
# optional trailing comments
 
1425
(?:
 
1426
\.
 
1427
[\040\t]*                    # Nab whitespace.
 
1428
(?:
 
1429
\(                              #  (
 
1430
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1431
(?:                                 #       (
 
1432
(?:  \\ [^\x80-\xff]  |
 
1433
\(                            #  (
 
1434
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1435
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1436
\)                           #                       )
 
1437
)    #         special
 
1438
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1439
)*                                  #            )*
 
1440
\)                             #                )
 
1441
[\040\t]* )*    # If comment found, allow more spaces.
 
1442
(?:
 
1443
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1444
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1445
|
 
1446
\[                            # [
 
1447
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1448
\]                           #           ]
 
1449
)
 
1450
[\040\t]*                    # Nab whitespace.
 
1451
(?:
 
1452
\(                              #  (
 
1453
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1454
(?:                                 #       (
 
1455
(?:  \\ [^\x80-\xff]  |
 
1456
\(                            #  (
 
1457
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1458
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1459
\)                           #                       )
 
1460
)    #         special
 
1461
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1462
)*                                  #            )*
 
1463
\)                             #                )
 
1464
[\040\t]* )*    # If comment found, allow more spaces.
 
1465
# optional trailing comments
 
1466
)*
 
1467
(?: ,
 
1468
[\040\t]*                    # Nab whitespace.
 
1469
(?:
 
1470
\(                              #  (
 
1471
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1472
(?:                                 #       (
 
1473
(?:  \\ [^\x80-\xff]  |
 
1474
\(                            #  (
 
1475
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1476
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1477
\)                           #                       )
 
1478
)    #         special
 
1479
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1480
)*                                  #            )*
 
1481
\)                             #                )
 
1482
[\040\t]* )*    # If comment found, allow more spaces.
 
1483
@
 
1484
[\040\t]*                    # Nab whitespace.
 
1485
(?:
 
1486
\(                              #  (
 
1487
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1488
(?:                                 #       (
 
1489
(?:  \\ [^\x80-\xff]  |
 
1490
\(                            #  (
 
1491
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1492
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1493
\)                           #                       )
 
1494
)    #         special
 
1495
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1496
)*                                  #            )*
 
1497
\)                             #                )
 
1498
[\040\t]* )*    # If comment found, allow more spaces.
 
1499
(?:
 
1500
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1501
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1502
|
 
1503
\[                            # [
 
1504
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1505
\]                           #           ]
 
1506
)
 
1507
[\040\t]*                    # Nab whitespace.
 
1508
(?:
 
1509
\(                              #  (
 
1510
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1511
(?:                                 #       (
 
1512
(?:  \\ [^\x80-\xff]  |
 
1513
\(                            #  (
 
1514
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1515
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1516
\)                           #                       )
 
1517
)    #         special
 
1518
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1519
)*                                  #            )*
 
1520
\)                             #                )
 
1521
[\040\t]* )*    # If comment found, allow more spaces.
 
1522
# optional trailing comments
 
1523
(?:
 
1524
\.
 
1525
[\040\t]*                    # Nab whitespace.
 
1526
(?:
 
1527
\(                              #  (
 
1528
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1529
(?:                                 #       (
 
1530
(?:  \\ [^\x80-\xff]  |
 
1531
\(                            #  (
 
1532
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1533
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1534
\)                           #                       )
 
1535
)    #         special
 
1536
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1537
)*                                  #            )*
 
1538
\)                             #                )
 
1539
[\040\t]* )*    # If comment found, allow more spaces.
 
1540
(?:
 
1541
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1542
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1543
|
 
1544
\[                            # [
 
1545
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1546
\]                           #           ]
 
1547
)
 
1548
[\040\t]*                    # Nab whitespace.
 
1549
(?:
 
1550
\(                              #  (
 
1551
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1552
(?:                                 #       (
 
1553
(?:  \\ [^\x80-\xff]  |
 
1554
\(                            #  (
 
1555
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1556
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1557
\)                           #                       )
 
1558
)    #         special
 
1559
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1560
)*                                  #            )*
 
1561
\)                             #                )
 
1562
[\040\t]* )*    # If comment found, allow more spaces.
 
1563
# optional trailing comments
 
1564
)*
 
1565
)*  # additional domains
 
1566
:
 
1567
[\040\t]*                    # Nab whitespace.
 
1568
(?:
 
1569
\(                              #  (
 
1570
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1571
(?:                                 #       (
 
1572
(?:  \\ [^\x80-\xff]  |
 
1573
\(                            #  (
 
1574
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1575
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1576
\)                           #                       )
 
1577
)    #         special
 
1578
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1579
)*                                  #            )*
 
1580
\)                             #                )
 
1581
[\040\t]* )*    # If comment found, allow more spaces.
 
1582
# optional trailing comments
 
1583
)?     #       optional route
 
1584
(?:
 
1585
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1586
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1587
# Atom
 
1588
|                       #  or
 
1589
"                                     # "
 
1590
[^\\\x80-\xff\n\015"] *                            #   normal
 
1591
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1592
"                                     #        "
 
1593
# Quoted string
 
1594
)
 
1595
[\040\t]*                    # Nab whitespace.
 
1596
(?:
 
1597
\(                              #  (
 
1598
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1599
(?:                                 #       (
 
1600
(?:  \\ [^\x80-\xff]  |
 
1601
\(                            #  (
 
1602
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1603
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1604
\)                           #                       )
 
1605
)    #         special
 
1606
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1607
)*                                  #            )*
 
1608
\)                             #                )
 
1609
[\040\t]* )*    # If comment found, allow more spaces.
 
1610
(?:
 
1611
\.
 
1612
[\040\t]*                    # Nab whitespace.
 
1613
(?:
 
1614
\(                              #  (
 
1615
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1616
(?:                                 #       (
 
1617
(?:  \\ [^\x80-\xff]  |
 
1618
\(                            #  (
 
1619
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1620
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1621
\)                           #                       )
 
1622
)    #         special
 
1623
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1624
)*                                  #            )*
 
1625
\)                             #                )
 
1626
[\040\t]* )*    # If comment found, allow more spaces.
 
1627
(?:
 
1628
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1629
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1630
# Atom
 
1631
|                       #  or
 
1632
"                                     # "
 
1633
[^\\\x80-\xff\n\015"] *                            #   normal
 
1634
(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
 
1635
"                                     #        "
 
1636
# Quoted string
 
1637
)
 
1638
[\040\t]*                    # Nab whitespace.
 
1639
(?:
 
1640
\(                              #  (
 
1641
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1642
(?:                                 #       (
 
1643
(?:  \\ [^\x80-\xff]  |
 
1644
\(                            #  (
 
1645
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1646
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1647
\)                           #                       )
 
1648
)    #         special
 
1649
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1650
)*                                  #            )*
 
1651
\)                             #                )
 
1652
[\040\t]* )*    # If comment found, allow more spaces.
 
1653
# additional words
 
1654
)*
 
1655
@
 
1656
[\040\t]*                    # Nab whitespace.
 
1657
(?:
 
1658
\(                              #  (
 
1659
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1660
(?:                                 #       (
 
1661
(?:  \\ [^\x80-\xff]  |
 
1662
\(                            #  (
 
1663
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1664
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1665
\)                           #                       )
 
1666
)    #         special
 
1667
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1668
)*                                  #            )*
 
1669
\)                             #                )
 
1670
[\040\t]* )*    # If comment found, allow more spaces.
 
1671
(?:
 
1672
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1673
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1674
|
 
1675
\[                            # [
 
1676
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1677
\]                           #           ]
 
1678
)
 
1679
[\040\t]*                    # Nab whitespace.
 
1680
(?:
 
1681
\(                              #  (
 
1682
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1683
(?:                                 #       (
 
1684
(?:  \\ [^\x80-\xff]  |
 
1685
\(                            #  (
 
1686
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1687
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1688
\)                           #                       )
 
1689
)    #         special
 
1690
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1691
)*                                  #            )*
 
1692
\)                             #                )
 
1693
[\040\t]* )*    # If comment found, allow more spaces.
 
1694
# optional trailing comments
 
1695
(?:
 
1696
\.
 
1697
[\040\t]*                    # Nab whitespace.
 
1698
(?:
 
1699
\(                              #  (
 
1700
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1701
(?:                                 #       (
 
1702
(?:  \\ [^\x80-\xff]  |
 
1703
\(                            #  (
 
1704
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1705
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1706
\)                           #                       )
 
1707
)    #         special
 
1708
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1709
)*                                  #            )*
 
1710
\)                             #                )
 
1711
[\040\t]* )*    # If comment found, allow more spaces.
 
1712
(?:
 
1713
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 
1714
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 
1715
|
 
1716
\[                            # [
 
1717
(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
 
1718
\]                           #           ]
 
1719
)
 
1720
[\040\t]*                    # Nab whitespace.
 
1721
(?:
 
1722
\(                              #  (
 
1723
[^\\\x80-\xff\n\015()] *                             #     normal*
 
1724
(?:                                 #       (
 
1725
(?:  \\ [^\x80-\xff]  |
 
1726
\(                            #  (
 
1727
[^\\\x80-\xff\n\015()] *                            #     normal*
 
1728
(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
 
1729
\)                           #                       )
 
1730
)    #         special
 
1731
[^\\\x80-\xff\n\015()] *                         #         normal*
 
1732
)*                                  #            )*
 
1733
\)                             #                )
 
1734
[\040\t]* )*    # If comment found, allow more spaces.
 
1735
# optional trailing comments
 
1736
)*
 
1737
#       address spec
 
1738
>                    #                 >
 
1739
# name and address
 
1740
)
 
1741
/x
 
1742
    Alan Other <user\@dom.ain>
 
1743
 0: Alan Other <user@dom.ain>
 
1744
    <user\@dom.ain>
 
1745
 0: user@dom.ain
 
1746
    user\@dom.ain
 
1747
 0: user@dom.ain
 
1748
    \"A. Other\" <user.1234\@dom.ain> (a comment)
 
1749
 0: "A. Other" <user.1234@dom.ain>
 
1750
    A. Other <user.1234\@dom.ain> (a comment)
 
1751
 0:  Other <user.1234@dom.ain>
 
1752
    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
 
1753
 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
 
1754
    A missing angle <user\@some.where
 
1755
 0: user@some.where
 
1756
    *** Failers
 
1757
No match
 
1758
    The quick brown fox
 
1759
No match
 
1760
 
 
1761
/abc\0def\00pqr\000xyz\0000AB/
 
1762
    abc\0def\00pqr\000xyz\0000AB
 
1763
 0: abc\x00def\x00pqr\x00xyz\x000AB
 
1764
    abc456 abc\0def\00pqr\000xyz\0000ABCDE
 
1765
 0: abc\x00def\x00pqr\x00xyz\x000AB
 
1766
 
 
1767
/abc\x0def\x00pqr\x000xyz\x0000AB/
 
1768
    abc\x0def\x00pqr\x000xyz\x0000AB
 
1769
 0: abc\x0def\x00pqr\x000xyz\x0000AB
 
1770
    abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
 
1771
 0: abc\x0def\x00pqr\x000xyz\x0000AB
 
1772
 
 
1773
/^[\000-\037]/
 
1774
    \0A
 
1775
 0: \x00
 
1776
    \01B
 
1777
 0: \x01
 
1778
    \037C
 
1779
 0: \x1f
 
1780
 
 
1781
/\0*/
 
1782
    \0\0\0\0
 
1783
 0: \x00\x00\x00\x00
 
1784
 
 
1785
/A\x0{2,3}Z/
 
1786
    The A\x0\x0Z
 
1787
 0: A\x00\x00Z
 
1788
    An A\0\x0\0Z
 
1789
 0: A\x00\x00\x00Z
 
1790
    *** Failers
 
1791
No match
 
1792
    A\0Z
 
1793
No match
 
1794
    A\0\x0\0\x0Z
 
1795
No match
 
1796
 
 
1797
/^(cow|)\1(bell)/
 
1798
    cowcowbell
 
1799
 0: cowcowbell
 
1800
 1: cow
 
1801
 2: bell
 
1802
    bell
 
1803
 0: bell
 
1804
 1: 
 
1805
 2: bell
 
1806
    *** Failers
 
1807
No match
 
1808
    cowbell
 
1809
No match
 
1810
 
 
1811
/^\s/
 
1812
    \040abc
 
1813
 0:  
 
1814
    \x0cabc
 
1815
 0: \x0c
 
1816
    \nabc
 
1817
 0: \x0a
 
1818
    \rabc
 
1819
 0: \x0d
 
1820
    \tabc
 
1821
 0: \x09
 
1822
    *** Failers
 
1823
No match
 
1824
    abc
 
1825
No match
 
1826
 
 
1827
/^a     b
 
1828
  
0
1829
    c/x
 
1830
    abc
 
1831
 0: abc
 
1832
 
 
1833
/^(a|)\1*b/
 
1834
    ab
 
1835
 0: ab
 
1836
 1: a
 
1837
    aaaab
 
1838
 0: aaaab
 
1839
 1: a
 
1840
    b
 
1841
 0: b
 
1842
 1: 
 
1843
    *** Failers
 
1844
No match
 
1845
    acb
 
1846
No match
 
1847
 
 
1848
/^(a|)\1+b/
 
1849
    aab
 
1850
 0: aab
 
1851
 1: a
 
1852
    aaaab
 
1853
 0: aaaab
 
1854
 1: a
 
1855
    b
 
1856
 0: b
 
1857
 1: 
 
1858
    *** Failers
 
1859
No match
 
1860
    ab
 
1861
No match
 
1862
 
 
1863
/^(a|)\1?b/
 
1864
    ab
 
1865
 0: ab
 
1866
 1: a
 
1867
    aab
 
1868
 0: aab
 
1869
 1: a
 
1870
    b
 
1871
 0: b
 
1872
 1: 
 
1873
    *** Failers
 
1874
No match
 
1875
    acb
 
1876
No match
 
1877
 
 
1878
/^(a|)\1{2}b/
 
1879
    aaab
 
1880
 0: aaab
 
1881
 1: a
 
1882
    b
 
1883
 0: b
 
1884
 1: 
 
1885
    *** Failers
 
1886
No match
 
1887
    ab
 
1888
No match
 
1889
    aab
 
1890
No match
 
1891
    aaaab
 
1892
No match
 
1893
 
 
1894
/^(a|)\1{2,3}b/
 
1895
    aaab
 
1896
 0: aaab
 
1897
 1: a
 
1898
    aaaab
 
1899
 0: aaaab
 
1900
 1: a
 
1901
    b
 
1902
 0: b
 
1903
 1: 
 
1904
    *** Failers
 
1905
No match
 
1906
    ab
 
1907
No match
 
1908
    aab
 
1909
No match
 
1910
    aaaaab
 
1911
No match
 
1912
 
 
1913
/ab{1,3}bc/
 
1914
    abbbbc
 
1915
 0: abbbbc
 
1916
    abbbc
 
1917
 0: abbbc
 
1918
    abbc
 
1919
 0: abbc
 
1920
    *** Failers
 
1921
No match
 
1922
    abc
 
1923
No match
 
1924
    abbbbbc
 
1925
No match
 
1926
 
 
1927
/([^.]*)\.([^:]*):[T ]+(.*)/
 
1928
    track1.title:TBlah blah blah
 
1929
 0: track1.title:TBlah blah blah
 
1930
 1: track1
 
1931
 2: title
 
1932
 3: Blah blah blah
 
1933
 
 
1934
/([^.]*)\.([^:]*):[T ]+(.*)/i
 
1935
    track1.title:TBlah blah blah
 
1936
 0: track1.title:TBlah blah blah
 
1937
 1: track1
 
1938
 2: title
 
1939
 3: Blah blah blah
 
1940
 
 
1941
/([^.]*)\.([^:]*):[t ]+(.*)/i
 
1942
    track1.title:TBlah blah blah
 
1943
 0: track1.title:TBlah blah blah
 
1944
 1: track1
 
1945
 2: title
 
1946
 3: Blah blah blah
 
1947
 
 
1948
/^[W-c]+$/
 
1949
    WXY_^abc
 
1950
 0: WXY_^abc
 
1951
    ***Failers
 
1952
No match
 
1953
    wxy
 
1954
No match
 
1955
 
 
1956
/^[W-c]+$/i
 
1957
    WXY_^abc
 
1958
 0: WXY_^abc
 
1959
    wxy_^ABC
 
1960
 0: wxy_^ABC
 
1961
 
 
1962
/^[\x3f-\x5F]+$/i
 
1963
    WXY_^abc
 
1964
 0: WXY_^abc
 
1965
    wxy_^ABC
 
1966
 0: wxy_^ABC
 
1967
 
 
1968
/^abc$/m
 
1969
    abc
 
1970
 0: abc
 
1971
    qqq\nabc
 
1972
 0: abc
 
1973
    abc\nzzz
 
1974
 0: abc
 
1975
    qqq\nabc\nzzz
 
1976
 0: abc
 
1977
 
 
1978
/^abc$/
 
1979
    abc
 
1980
 0: abc
 
1981
    *** Failers
 
1982
No match
 
1983
    qqq\nabc
 
1984
No match
 
1985
    abc\nzzz
 
1986
No match
 
1987
    qqq\nabc\nzzz
 
1988
No match
 
1989
 
 
1990
/\Aabc\Z/m
 
1991
    abc
 
1992
 0: abc
 
1993
    abc\n 
 
1994
 0: abc
 
1995
    *** Failers
 
1996
No match
 
1997
    qqq\nabc
 
1998
No match
 
1999
    abc\nzzz
 
2000
No match
 
2001
    qqq\nabc\nzzz
 
2002
No match
 
2003
    
 
2004
/\A(.)*\Z/s
 
2005
    abc\ndef
 
2006
 0: abc\x0adef
 
2007
 1: f
 
2008
 
 
2009
/\A(.)*\Z/m
 
2010
    *** Failers
 
2011
 0: *** Failers
 
2012
 1: s
 
2013
    abc\ndef
 
2014
No match
 
2015
 
 
2016
/(?:b)|(?::+)/
 
2017
    b::c
 
2018
 0: b
 
2019
    c::b
 
2020
 0: ::
 
2021
 
 
2022
/[-az]+/
 
2023
    az-
 
2024
 0: az-
 
2025
    *** Failers
 
2026
 0: a
 
2027
    b
 
2028
No match
 
2029
 
 
2030
/[az-]+/
 
2031
    za-
 
2032
 0: za-
 
2033
    *** Failers
 
2034
 0: a
 
2035
    b
 
2036
No match
 
2037
 
 
2038
/[a\-z]+/
 
2039
    a-z
 
2040
 0: a-z
 
2041
    *** Failers
 
2042
 0: a
 
2043
    b
 
2044
No match
 
2045
 
 
2046
/[a-z]+/
 
2047
    abcdxyz
 
2048
 0: abcdxyz
 
2049
 
 
2050
/[\d-]+/
 
2051
    12-34
 
2052
 0: 12-34
 
2053
    *** Failers
 
2054
No match
 
2055
    aaa
 
2056
No match
 
2057
 
 
2058
/[\d-z]+/
 
2059
    12-34z
 
2060
 0: 12-34z
 
2061
    *** Failers
 
2062
No match
 
2063
    aaa
 
2064
No match
 
2065
 
 
2066
/\x5c/
 
2067
    \\
 
2068
 0: \
 
2069
 
 
2070
/\x20Z/
 
2071
    the Zoo
 
2072
 0:  Z
 
2073
    *** Failers
 
2074
No match
 
2075
    Zulu
 
2076
No match
 
2077
 
 
2078
/(abc)\1/i
 
2079
    abcabc
 
2080
 0: abcabc
 
2081
 1: abc
 
2082
    ABCabc
 
2083
 0: ABCabc
 
2084
 1: ABC
 
2085
    abcABC
 
2086
 0: abcABC
 
2087
 1: abc
 
2088
 
 
2089
/ab{3cd/
 
2090
    ab{3cd
 
2091
 0: ab{3cd
 
2092
 
 
2093
/ab{3,cd/
 
2094
    ab{3,cd
 
2095
 0: ab{3,cd
 
2096
 
 
2097
/ab{3,4a}cd/
 
2098
    ab{3,4a}cd
 
2099
 0: ab{3,4a}cd
 
2100
 
 
2101
/{4,5a}bc/
 
2102
    {4,5a}bc
 
2103
 0: {4,5a}bc
 
2104
 
 
2105
/^a.b/
 
2106
    a\rb
 
2107
 0: a\x0db
 
2108
    *** Failers
 
2109
No match
 
2110
    a\nb
 
2111
No match
 
2112
 
 
2113
/abc$/
 
2114
    abc
 
2115
 0: abc
 
2116
    abc\n
 
2117
 0: abc
 
2118
    *** Failers
 
2119
No match
 
2120
    abc\ndef
 
2121
No match
 
2122
 
 
2123
/(abc)\123/
 
2124
    abc\x53
 
2125
 0: abcS
 
2126
 1: abc
 
2127
 
 
2128
/(abc)\223/
 
2129
    abc\x93
 
2130
 0: abc\x93
 
2131
 1: abc
 
2132
 
 
2133
/(abc)\323/
 
2134
    abc\xd3
 
2135
 0: abc\xd3
 
2136
 1: abc
 
2137
 
 
2138
/(abc)\500/
 
2139
    abc\x40
 
2140
 0: abc@
 
2141
 1: abc
 
2142
    abc\100
 
2143
 0: abc@
 
2144
 1: abc
 
2145
 
 
2146
/(abc)\5000/
 
2147
    abc\x400
 
2148
 0: abc@0
 
2149
 1: abc
 
2150
    abc\x40\x30
 
2151
 0: abc@0
 
2152
 1: abc
 
2153
    abc\1000
 
2154
 0: abc@0
 
2155
 1: abc
 
2156
    abc\100\x30
 
2157
 0: abc@0
 
2158
 1: abc
 
2159
    abc\100\060
 
2160
 0: abc@0
 
2161
 1: abc
 
2162
    abc\100\60
 
2163
 0: abc@0
 
2164
 1: abc
 
2165
 
 
2166
/abc\81/
 
2167
    abc\081
 
2168
 0: abc\x0081
 
2169
    abc\0\x38\x31
 
2170
 0: abc\x0081
 
2171
 
 
2172
/abc\91/
 
2173
    abc\091
 
2174
 0: abc\x0091
 
2175
    abc\0\x39\x31
 
2176
 0: abc\x0091
 
2177
 
 
2178
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
 
2179
    abcdefghijkllS
 
2180
 0: abcdefghijkllS
 
2181
 1: a
 
2182
 2: b
 
2183
 3: c
 
2184
 4: d
 
2185
 5: e
 
2186
 6: f
 
2187
 7: g
 
2188
 8: h
 
2189
 9: i
 
2190
10: j
 
2191
11: k
 
2192
12: l
 
2193
 
 
2194
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
 
2195
    abcdefghijk\12S
 
2196
 0: abcdefghijk\x0aS
 
2197
 1: a
 
2198
 2: b
 
2199
 3: c
 
2200
 4: d
 
2201
 5: e
 
2202
 6: f
 
2203
 7: g
 
2204
 8: h
 
2205
 9: i
 
2206
10: j
 
2207
11: k
 
2208
 
 
2209
/ab\gdef/
 
2210
    abgdef
 
2211
 0: abgdef
 
2212
 
 
2213
/a{0}bc/
 
2214
    bc
 
2215
 0: bc
 
2216
 
 
2217
/(a|(bc)){0,0}?xyz/
 
2218
    xyz
 
2219
 0: xyz
 
2220
 
 
2221
/abc[\10]de/
 
2222
    abc\010de
 
2223
 0: abc\x08de
 
2224
 
 
2225
/abc[\1]de/
 
2226
    abc\1de
 
2227
 0: abc\x01de
 
2228
 
 
2229
/(abc)[\1]de/
 
2230
    abc\1de
 
2231
 0: abc\x01de
 
2232
 1: abc
 
2233
 
 
2234
/a.b(?s)/
 
2235
    a\nb
 
2236
 0: a\x0ab
 
2237
 
 
2238
/^([^a])([^\b])([^c]*)([^d]{3,4})/
 
2239
    baNOTccccd
 
2240
 0: baNOTcccc
 
2241
 1: b
 
2242
 2: a
 
2243
 3: NOT
 
2244
 4: cccc
 
2245
    baNOTcccd
 
2246
 0: baNOTccc
 
2247
 1: b
 
2248
 2: a
 
2249
 3: NOT
 
2250
 4: ccc
 
2251
    baNOTccd
 
2252
 0: baNOTcc
 
2253
 1: b
 
2254
 2: a
 
2255
 3: NO
 
2256
 4: Tcc
 
2257
    bacccd
 
2258
 0: baccc
 
2259
 1: b
 
2260
 2: a
 
2261
 3: 
 
2262
 4: ccc
 
2263
    *** Failers
 
2264
 0: *** Failers
 
2265
 1: *
 
2266
 2: *
 
2267
 3: * Fail
 
2268
 4: ers
 
2269
    anything
 
2270
No match
 
2271
    b\bc   
 
2272
No match
 
2273
    baccd
 
2274
No match
 
2275
 
 
2276
/[^a]/
 
2277
    Abc
 
2278
 0: A
 
2279
  
 
2280
/[^a]/i
 
2281
    Abc 
 
2282
 0: b
 
2283
 
 
2284
/[^a]+/
 
2285
    AAAaAbc
 
2286
 0: AAA
 
2287
  
 
2288
/[^a]+/i
 
2289
    AAAaAbc 
 
2290
 0: bc
 
2291
 
 
2292
/[^a]+/
 
2293
    bbb\nccc
 
2294
 0: bbb\x0accc
 
2295
   
 
2296
/[^k]$/
 
2297
    abc
 
2298
 0: c
 
2299
    *** Failers
 
2300
 0: s
 
2301
    abk   
 
2302
No match
 
2303
   
 
2304
/[^k]{2,3}$/
 
2305
    abc
 
2306
 0: abc
 
2307
    kbc
 
2308
 0: bc
 
2309
    kabc 
 
2310
 0: abc
 
2311
    *** Failers
 
2312
 0: ers
 
2313
    abk
 
2314
No match
 
2315
    akb
 
2316
No match
 
2317
    akk 
 
2318
No match
 
2319
 
 
2320
/^\d{8,}\@.+[^k]$/
 
2321
    12345678\@a.b.c.d
 
2322
 0: 12345678@a.b.c.d
 
2323
    123456789\@x.y.z
 
2324
 0: 123456789@x.y.z
 
2325
    *** Failers
 
2326
No match
 
2327
    12345678\@x.y.uk
 
2328
No match
 
2329
    1234567\@a.b.c.d       
 
2330
No match
 
2331
 
 
2332
/(a)\1{8,}/
 
2333
    aaaaaaaaa
 
2334
 0: aaaaaaaaa
 
2335
 1: a
 
2336
    aaaaaaaaaa
 
2337
 0: aaaaaaaaaa
 
2338
 1: a
 
2339
    *** Failers
 
2340
No match
 
2341
    aaaaaaa   
 
2342
No match
 
2343
 
 
2344
/[^a]/
 
2345
    aaaabcd
 
2346
 0: b
 
2347
    aaAabcd 
 
2348
 0: A
 
2349
 
 
2350
/[^a]/i
 
2351
    aaaabcd
 
2352
 0: b
 
2353
    aaAabcd 
 
2354
 0: b
 
2355
 
 
2356
/[^az]/
 
2357
    aaaabcd
 
2358
 0: b
 
2359
    aaAabcd 
 
2360
 0: A
 
2361
 
 
2362
/[^az]/i
 
2363
    aaaabcd
 
2364
 0: b
 
2365
    aaAabcd 
 
2366
 0: b
 
2367
 
 
2368
/\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/
 
2369
 \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
 
2370
 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
 
2371
 
 
2372
/P[^*]TAIRE[^*]{1,6}?LL/
 
2373
    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
 
2374
 0: PSTAIREISLL
 
2375
 
 
2376
/P[^*]TAIRE[^*]{1,}?LL/
 
2377
    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
 
2378
 0: PSTAIREISLL
 
2379
 
 
2380
/(\.\d\d[1-9]?)\d+/
 
2381
    1.230003938
 
2382
 0: .230003938
 
2383
 1: .23
 
2384
    1.875000282   
 
2385
 0: .875000282
 
2386
 1: .875
 
2387
    1.235  
 
2388
 0: .235
 
2389
 1: .23
 
2390
                  
 
2391
/(\.\d\d((?=0)|\d(?=\d)))/
 
2392
    1.230003938      
 
2393
 0: .23
 
2394
 1: .23
 
2395
 2: 
 
2396
    1.875000282
 
2397
 0: .875
 
2398
 1: .875
 
2399
 2: 5
 
2400
    *** Failers 
 
2401
No match
 
2402
    1.235 
 
2403
No match
 
2404
    
 
2405
/a(?)b/
 
2406
    ab 
 
2407
 0: ab
 
2408
 
 
2409
/\b(foo)\s+(\w+)/i
 
2410
    Food is on the foo table
 
2411
 0: foo table
 
2412
 1: foo
 
2413
 2: table
 
2414
    
 
2415
/foo(.*)bar/
 
2416
    The food is under the bar in the barn.
 
2417
 0: food is under the bar in the bar
 
2418
 1: d is under the bar in the 
 
2419
    
 
2420
/foo(.*?)bar/  
 
2421
    The food is under the bar in the barn.
 
2422
 0: food is under the bar
 
2423
 1: d is under the 
 
2424
 
 
2425
/(.*)(\d*)/
 
2426
    I have 2 numbers: 53147
 
2427
 0: I have 2 numbers: 53147
 
2428
 1: I have 2 numbers: 53147
 
2429
 2: 
 
2430
    
 
2431
/(.*)(\d+)/
 
2432
    I have 2 numbers: 53147
 
2433
 0: I have 2 numbers: 53147
 
2434
 1: I have 2 numbers: 5314
 
2435
 2: 7
 
2436
 
 
2437
/(.*?)(\d*)/
 
2438
    I have 2 numbers: 53147
 
2439
 0: 
 
2440
 1: 
 
2441
 2: 
 
2442
 
 
2443
/(.*?)(\d+)/
 
2444
    I have 2 numbers: 53147
 
2445
 0: I have 2
 
2446
 1: I have 
 
2447
 2: 2
 
2448
 
 
2449
/(.*)(\d+)$/
 
2450
    I have 2 numbers: 53147
 
2451
 0: I have 2 numbers: 53147
 
2452
 1: I have 2 numbers: 5314
 
2453
 2: 7
 
2454
 
 
2455
/(.*?)(\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
/(.*)\b(\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)(\d+)$/
 
2468
    I have 2 numbers: 53147
 
2469
 0: I have 2 numbers: 53147
 
2470
 1: I have 2 numbers: 
 
2471
 2: 53147
 
2472
 
 
2473
/^\D*(?!123)/
 
2474
    ABC123
 
2475
 0: AB
 
2476
     
 
2477
/^(\D*)(?=\d)(?!123)/
 
2478
    ABC445
 
2479
 0: ABC
 
2480
 1: ABC
 
2481
    *** Failers
 
2482
No match
 
2483
    ABC123
 
2484
No match
 
2485
    
 
2486
/^[W-]46]/
 
2487
    W46]789 
 
2488
 0: W46]
 
2489
    -46]789
 
2490
 0: -46]
 
2491
    *** Failers
 
2492
No match
 
2493
    Wall
 
2494
No match
 
2495
    Zebra
 
2496
No match
 
2497
    42
 
2498
No match
 
2499
    [abcd] 
 
2500
No match
 
2501
    ]abcd[
 
2502
No match
 
2503
       
 
2504
/^[W-\]46]/
 
2505
    W46]789 
 
2506
 0: W
 
2507
    Wall
 
2508
 0: W
 
2509
    Zebra
 
2510
 0: Z
 
2511
    Xylophone  
 
2512
 0: X
 
2513
    42
 
2514
 0: 4
 
2515
    [abcd] 
 
2516
 0: [
 
2517
    ]abcd[
 
2518
 0: ]
 
2519
    \\backslash 
 
2520
 0: \
 
2521
    *** Failers
 
2522
No match
 
2523
    -46]789
 
2524
No match
 
2525
    well
 
2526
No match
 
2527
    
 
2528
/\d\d\/\d\d\/\d\d\d\d/
 
2529
    01/01/2000
 
2530
 0: 01/01/2000
 
2531
 
 
2532
/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
 
2533
  word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
2534
 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
 
2535
  *** Failers
 
2536
No match
 
2537
  word cat dog elephant mussel cow horse canary baboon snake shark
 
2538
No match
 
2539
 
 
2540
/word (?:[a-zA-Z0-9]+ ){0,30}otherword/
 
2541
  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 otherword
 
2542
 0: 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 otherword
 
2543
  *** Failers
 
2544
No match
 
2545
  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
 
2546
No match
 
2547
  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 oops too many
 
2548
No match
 
2549
 
 
2550
/^(a){0,0}/
 
2551
    bcd
 
2552
 0: 
 
2553
    abc
 
2554
 0: 
 
2555
    aab     
 
2556
 0: 
 
2557
 
 
2558
/^(a){0,1}/
 
2559
    bcd
 
2560
 0: 
 
2561
    abc
 
2562
 0: a
 
2563
 1: a
 
2564
    aab  
 
2565
 0: a
 
2566
 1: a
 
2567
 
 
2568
/^(a){0,2}/
 
2569
    bcd
 
2570
 0: 
 
2571
    abc
 
2572
 0: a
 
2573
 1: a
 
2574
    aab  
 
2575
 0: aa
 
2576
 1: a
 
2577
 
 
2578
/^(a){0,3}/
 
2579
    bcd
 
2580
 0: 
 
2581
    abc
 
2582
 0: a
 
2583
 1: a
 
2584
    aab
 
2585
 0: aa
 
2586
 1: a
 
2587
    aaa   
 
2588
 0: aaa
 
2589
 1: a
 
2590
 
 
2591
/^(a){0,}/
 
2592
    bcd
 
2593
 0: 
 
2594
    abc
 
2595
 0: a
 
2596
 1: a
 
2597
    aab
 
2598
 0: aa
 
2599
 1: a
 
2600
    aaa
 
2601
 0: aaa
 
2602
 1: a
 
2603
    aaaaaaaa    
 
2604
 0: aaaaaaaa
 
2605
 1: a
 
2606
 
 
2607
/^(a){1,1}/
 
2608
    abc
 
2609
 0: a
 
2610
 1: a
 
2611
    aab  
 
2612
 0: a
 
2613
 1: a
 
2614
    *** Failers
 
2615
No match
 
2616
    bcd
 
2617
No match
 
2618
 
 
2619
/^(a){1,2}/
 
2620
    abc
 
2621
 0: a
 
2622
 1: a
 
2623
    aab  
 
2624
 0: aa
 
2625
 1: a
 
2626
    *** Failers
 
2627
No match
 
2628
    bcd
 
2629
No match
 
2630
 
 
2631
/^(a){1,3}/
 
2632
    abc
 
2633
 0: a
 
2634
 1: a
 
2635
    aab
 
2636
 0: aa
 
2637
 1: a
 
2638
    aaa   
 
2639
 0: aaa
 
2640
 1: a
 
2641
    *** Failers
 
2642
No match
 
2643
    bcd
 
2644
No match
 
2645
 
 
2646
/^(a){1,}/
 
2647
    abc
 
2648
 0: a
 
2649
 1: a
 
2650
    aab
 
2651
 0: aa
 
2652
 1: a
 
2653
    aaa
 
2654
 0: aaa
 
2655
 1: a
 
2656
    aaaaaaaa    
 
2657
 0: aaaaaaaa
 
2658
 1: a
 
2659
    *** Failers
 
2660
No match
 
2661
    bcd
 
2662
No match
 
2663
 
 
2664
/.*\.gif/
 
2665
    borfle\nbib.gif\nno
 
2666
 0: bib.gif
 
2667
 
 
2668
/.{0,}\.gif/
 
2669
    borfle\nbib.gif\nno
 
2670
 0: bib.gif
 
2671
 
 
2672
/.*\.gif/m
 
2673
    borfle\nbib.gif\nno
 
2674
 0: bib.gif
 
2675
 
 
2676
/.*\.gif/s
 
2677
    borfle\nbib.gif\nno
 
2678
 0: borfle\x0abib.gif
 
2679
 
 
2680
/.*\.gif/ms
 
2681
    borfle\nbib.gif\nno
 
2682
 0: borfle\x0abib.gif
 
2683
    
 
2684
/.*$/
 
2685
    borfle\nbib.gif\nno
 
2686
 0: no
 
2687
 
 
2688
/.*$/m
 
2689
    borfle\nbib.gif\nno
 
2690
 0: borfle
 
2691
 
 
2692
/.*$/s
 
2693
    borfle\nbib.gif\nno
 
2694
 0: borfle\x0abib.gif\x0ano
 
2695
 
 
2696
/.*$/ms
 
2697
    borfle\nbib.gif\nno
 
2698
 0: borfle\x0abib.gif\x0ano
 
2699
    
 
2700
/.*$/
 
2701
    borfle\nbib.gif\nno\n
 
2702
 0: no
 
2703
 
 
2704
/.*$/m
 
2705
    borfle\nbib.gif\nno\n
 
2706
 0: borfle
 
2707
 
 
2708
/.*$/s
 
2709
    borfle\nbib.gif\nno\n
 
2710
 0: borfle\x0abib.gif\x0ano\x0a
 
2711
 
 
2712
/.*$/ms
 
2713
    borfle\nbib.gif\nno\n
 
2714
 0: borfle\x0abib.gif\x0ano\x0a
 
2715
    
 
2716
/(.*X|^B)/
 
2717
    abcde\n1234Xyz
 
2718
 0: 1234X
 
2719
 1: 1234X
 
2720
    BarFoo 
 
2721
 0: B
 
2722
 1: B
 
2723
    *** Failers
 
2724
No match
 
2725
    abcde\nBar  
 
2726
No match
 
2727
 
 
2728
/(.*X|^B)/m
 
2729
    abcde\n1234Xyz
 
2730
 0: 1234X
 
2731
 1: 1234X
 
2732
    BarFoo 
 
2733
 0: B
 
2734
 1: B
 
2735
    abcde\nBar  
 
2736
 0: B
 
2737
 1: B
 
2738
 
 
2739
/(.*X|^B)/s
 
2740
    abcde\n1234Xyz
 
2741
 0: abcde\x0a1234X
 
2742
 1: abcde\x0a1234X
 
2743
    BarFoo 
 
2744
 0: B
 
2745
 1: B
 
2746
    *** Failers
 
2747
No match
 
2748
    abcde\nBar  
 
2749
No match
 
2750
 
 
2751
/(.*X|^B)/ms
 
2752
    abcde\n1234Xyz
 
2753
 0: abcde\x0a1234X
 
2754
 1: abcde\x0a1234X
 
2755
    BarFoo 
 
2756
 0: B
 
2757
 1: B
 
2758
    abcde\nBar  
 
2759
 0: B
 
2760
 1: B
 
2761
 
 
2762
/(?s)(.*X|^B)/
 
2763
    abcde\n1234Xyz
 
2764
 0: abcde\x0a1234X
 
2765
 1: abcde\x0a1234X
 
2766
    BarFoo 
 
2767
 0: B
 
2768
 1: B
 
2769
    *** Failers 
 
2770
No match
 
2771
    abcde\nBar  
 
2772
No match
 
2773
 
 
2774
/(?s:.*X|^B)/
 
2775
    abcde\n1234Xyz
 
2776
 0: abcde\x0a1234X
 
2777
    BarFoo 
 
2778
 0: B
 
2779
    *** Failers 
 
2780
No match
 
2781
    abcde\nBar  
 
2782
No match
 
2783
 
 
2784
/^.*B/
 
2785
    **** Failers
 
2786
No match
 
2787
    abc\nB
 
2788
No match
 
2789
     
 
2790
/(?s)^.*B/
 
2791
    abc\nB
 
2792
 0: abc\x0aB
 
2793
 
 
2794
/(?m)^.*B/
 
2795
    abc\nB
 
2796
 0: B
 
2797
     
 
2798
/(?ms)^.*B/
 
2799
    abc\nB
 
2800
 0: abc\x0aB
 
2801
 
 
2802
/(?ms)^B/
 
2803
    abc\nB
 
2804
 0: B
 
2805
 
 
2806
/(?s)B$/
 
2807
    B\n
 
2808
 0: B
 
2809
 
 
2810
/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
 
2811
    123456654321
 
2812
 0: 123456654321
 
2813
  
 
2814
/^\d\d\d\d\d\d\d\d\d\d\d\d/
 
2815
    123456654321 
 
2816
 0: 123456654321
 
2817
 
 
2818
/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
 
2819
    123456654321
 
2820
 0: 123456654321
 
2821
  
 
2822
/^[abc]{12}/
 
2823
    abcabcabcabc
 
2824
 0: abcabcabcabc
 
2825
    
 
2826
/^[a-c]{12}/
 
2827
    abcabcabcabc
 
2828
 0: abcabcabcabc
 
2829
    
 
2830
/^(a|b|c){12}/
 
2831
    abcabcabcabc 
 
2832
 0: abcabcabcabc
 
2833
 1: c
 
2834
 
 
2835
/^[abcdefghijklmnopqrstuvwxy0123456789]/
 
2836
    n
 
2837
 0: n
 
2838
    *** Failers 
 
2839
No match
 
2840
    z 
 
2841
No match
 
2842
 
 
2843
/abcde{0,0}/
 
2844
    abcd
 
2845
 0: abcd
 
2846
    *** Failers
 
2847
No match
 
2848
    abce  
 
2849
No match
 
2850
 
 
2851
/ab[cd]{0,0}e/
 
2852
    abe
 
2853
 0: abe
 
2854
    *** Failers
 
2855
No match
 
2856
    abcde 
 
2857
No match
 
2858
    
 
2859
/ab(c){0,0}d/
 
2860
    abd
 
2861
 0: abd
 
2862
    *** Failers
 
2863
No match
 
2864
    abcd   
 
2865
No match
 
2866
 
 
2867
/a(b*)/
 
2868
    a
 
2869
 0: a
 
2870
 1: 
 
2871
    ab
 
2872
 0: ab
 
2873
 1: b
 
2874
    abbbb
 
2875
 0: abbbb
 
2876
 1: bbbb
 
2877
    *** Failers
 
2878
 0: a
 
2879
 1: 
 
2880
    bbbbb    
 
2881
No match
 
2882
    
 
2883
/ab\d{0}e/
 
2884
    abe
 
2885
 0: abe
 
2886
    *** Failers
 
2887
No match
 
2888
    ab1e   
 
2889
No match
 
2890
    
 
2891
/"([^\\"]+|\\.)*"/
 
2892
    the \"quick\" brown fox
 
2893
 0: "quick"
 
2894
 1: quick
 
2895
    \"the \\\"quick\\\" brown fox\" 
 
2896
 0: "the \"quick\" brown fox"
 
2897
 1:  brown fox
 
2898
 
 
2899
/.*?/g+
 
2900
    abc
 
2901
 0: 
 
2902
 0+ abc
 
2903
 0: a
 
2904
 0+ bc
 
2905
 0: 
 
2906
 0+ bc
 
2907
 0: b
 
2908
 0+ c
 
2909
 0: 
 
2910
 0+ c
 
2911
 0: c
 
2912
 0+ 
 
2913
 0: 
 
2914
 0+ 
 
2915
  
 
2916
/\b/g+
 
2917
    abc 
 
2918
 0: 
 
2919
 0+ abc
 
2920
 0: 
 
2921
 0+ 
 
2922
 
 
2923
/\b/+g
 
2924
    abc 
 
2925
 0: 
 
2926
 0+ abc
 
2927
 0: 
 
2928
 0+ 
 
2929
 
 
2930
//g
 
2931
    abc
 
2932
 0: 
 
2933
 0: 
 
2934
 0: 
 
2935
 0: 
 
2936
 
 
2937
/<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
 
2938
  <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>
 
2939
 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>
 
2940
 1:  BGCOLOR='#DBE9E9'
 
2941
 2:  align=left valign=top
 
2942
 3: 43.
 
2943
 4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)
 
2944
 5: 
 
2945
 6: 
 
2946
 7: <unset>
 
2947
 8:  align=left valign=top
 
2948
 9: Lega lstaff.com
 
2949
10:  align=left valign=top
 
2950
11: CA - Statewide
 
2951
 
 
2952
/a[^a]b/
 
2953
    acb
 
2954
 0: acb
 
2955
    a\nb
 
2956
 0: a\x0ab
 
2957
    
 
2958
/a.b/
 
2959
    acb
 
2960
 0: acb
 
2961
    *** Failers 
 
2962
No match
 
2963
    a\nb   
 
2964
No match
 
2965
    
 
2966
/a[^a]b/s
 
2967
    acb
 
2968
 0: acb
 
2969
    a\nb  
 
2970
 0: a\x0ab
 
2971
    
 
2972
/a.b/s
 
2973
    acb
 
2974
 0: acb
 
2975
    a\nb  
 
2976
 0: a\x0ab
 
2977
 
 
2978
/^(b+?|a){1,2}?c/
 
2979
    bac
 
2980
 0: bac
 
2981
 1: a
 
2982
    bbac
 
2983
 0: bbac
 
2984
 1: a
 
2985
    bbbac
 
2986
 0: bbbac
 
2987
 1: a
 
2988
    bbbbac
 
2989
 0: bbbbac
 
2990
 1: a
 
2991
    bbbbbac 
 
2992
 0: bbbbbac
 
2993
 1: a
 
2994
 
 
2995
/^(b+|a){1,2}?c/
 
2996
    bac
 
2997
 0: bac
 
2998
 1: a
 
2999
    bbac
 
3000
 0: bbac
 
3001
 1: a
 
3002
    bbbac
 
3003
 0: bbbac
 
3004
 1: a
 
3005
    bbbbac
 
3006
 0: bbbbac
 
3007
 1: a
 
3008
    bbbbbac 
 
3009
 0: bbbbbac
 
3010
 1: a
 
3011
    
 
3012
/(?!\A)x/m
 
3013
    a\bx\n  
 
3014
 0: x
 
3015
    *** Failers
 
3016
No match
 
3017
    x\nb\n
 
3018
No match
 
3019
    
 
3020
/\x0{ab}/
 
3021
    \0{ab} 
 
3022
 0: \x00{ab}
 
3023
 
 
3024
/(A|B)*?CD/
 
3025
    CD 
 
3026
 0: CD
 
3027
    
 
3028
/(A|B)*CD/
 
3029
    CD 
 
3030
 0: CD
 
3031
 
 
3032
/(AB)*?\1/
 
3033
    ABABAB
 
3034
 0: ABAB
 
3035
 1: AB
 
3036
 
 
3037
/(AB)*\1/
 
3038
    ABABAB
 
3039
 0: ABABAB
 
3040
 1: AB
 
3041
    
 
3042
/ End of testinput1 /
 
3043