-
Notifications
You must be signed in to change notification settings - Fork 27
/
regex-tester.txt
1782 lines (1782 loc) · 115 KB
/
regex-tester.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
awk version: awk version 20121220
awk - ^a.$ ab OK
awk - ^[a]b$ ab OK
awk - ^[^b]b$ ab OK
awk S2 ^abx?$ ab OK
awk S2 ^abx\?$ ab FAIL ab
awk S2 ^abx\\?$ ab FAIL ab
awk S2 ^abx*$ ab OK
awk S2 ^abx\*$ ab FAIL ab
awk S2 ^abx\\*$ ab FAIL ab
awk S2 ^ab+$ abb OK
awk S2 ^ab\+$ abb FAIL abb
awk S2 ^ab\\+$ abb FAIL abb
awk S2 ^ab{1}$ ab FAIL ab
awk S2 ^ab\{1}$ ab FAIL ab
awk S2 ^ab\{1\}$ ab FAIL ab
awk S2 ^ab\\{1\\}$ ab FAIL ab
awk S2 ^ab{1,}$ abb FAIL abb
awk S2 ^ab\{1,}$ abb FAIL abb
awk S2 ^ab\{1,\}$ abb FAIL abb
awk S2 ^ab\\{1,\\}$ abb FAIL abb
awk S2 ^ab{1,2}$ abb FAIL abb
awk S2 ^ab\{1,2}$ abb FAIL abb
awk S2 ^ab\{1,2\}$ abb FAIL abb
awk S2 ^ab\\{1,2\\}$ abb FAIL abb
awk ax123 ^a(b)$ ab OK
awk ax123 ^a\(b\)$ ab FAIL ab
awk ax123 ^a\\(b\\)$ ab FAIL ab
awk ax123 ^(x|ab)$ ab OK
awk ax123 ^\(x\|ab\)$ ab FAIL ab
awk ax123 ^\\(x\\|ab\\)$ ab FAIL ab
awk ax5 ^a\_$ a\_ FAIL a\_
awk ax5 ^a\\_$ a\_ OK
awk ax5 ^a\\\\_$ a\_ FAIL a\_
awk ax5 ^a\.b$ a.b OK
awk ax5 ^a\\.b$ a.b FAIL a.b
awk ax5 ^a*b$ a*b FAIL a*b
awk ax5 ^a\*b$ a*b OK
awk ax5 ^a\\*b$ a*b FAIL a*b
awk ax5 ^a[b$ a[b FAIL original-awk: nonterminated character class ^a[b$
awk ax5 ^a\[b$ a[b OK
awk ax5 ^a\\[b$ a[b FAIL original-awk: nonterminated character class ^a\\[b$
awk ax5 ^a]b$ a]b OK
awk ax5 ^a\]b$ a]b OK
awk ax5 ^a\\]b$ a]b FAIL a]b
awk ax5 ^a{b$ a{b OK
awk ax5 ^a\{b$ a{b OK
awk ax5 ^a\\{b$ a{b FAIL a{b
awk ax5 ^a}b$ a}b OK
awk ax5 ^a\}b$ a}b OK
awk ax5 ^a\\}b$ a}b FAIL a}b
awk ax5 ^a{5}b$ a{5}b OK
awk ax5 ^a\{5\}b$ a{5}b OK
awk ax5 ^a\\{5\\}b$ a{5}b FAIL a{5}b
awk ax5 ^a(b$ a(b FAIL original-awk: syntax error in regular expression ^a(b$ at
awk ax5 ^a\(b$ a(b OK
awk ax5 ^a\\(b$ a(b FAIL original-awk: syntax error in regular expression ^a\\(b$ at
awk ax5 ^a)b$ a)b FAIL original-awk: syntax error in regular expression ^a)b$ at b$
awk ax5 ^a\)b$ a)b OK
awk ax5 ^a\\)b$ a)b FAIL original-awk: syntax error in regular expression ^a\\)b$ at b$
awk ax5 ^(a|b)$ (a|b) FAIL (a|b)
awk ax5 ^\(a\|b\)$ (a|b) OK
awk ax5 ^\\(a\\|b\\)$ (a|b) FAIL (a|b)
awk ax5 ^a+b$ a+b FAIL a+b
awk ax5 ^a\+b$ a+b OK
awk ax5 ^a\\+b$ a+b FAIL a+b
awk ax5 ^a?b$ a?b FAIL a?b
awk ax5 ^a\?b$ a?b OK
awk ax5 ^a\\?b$ a?b FAIL a?b
awk ax5 ^a^b$ a^b FAIL original-awk: syntax error in regular expression ^a^b$ at b$
awk ax5 ^a\^b$ a^b OK
awk ax5 ^a\\^b$ a^b FAIL original-awk: syntax error in regular expression ^a\\^b$ at b$
awk ax5 ^a$b$ a$b FAIL a$b
awk ax5 ^a\$b$ a$b OK
awk ax5 ^a\\$b$ a$b FAIL a$b
awk ax6 ^a[\]_$ a\_ FAIL original-awk: nonterminated character class ^a[\]_$
awk ax6 ^a[\\]_$ a\_ OK
awk ax6 ^a[\\\\]_$ a\_ OK
awk ax7 ^a[[:alpha:]]$ ab OK
awk ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
chicken version: CHICKEN 4.12.0
chicken - ^a.$ ab OK
chicken - ^[a]b$ ab OK
chicken - ^[^b]b$ ab OK
chicken S2 ^abx?$ ab OK
chicken S2 ^abx\?$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\?
chicken S2 ^abx\\?$ ab FAIL
chicken S2 ^abx*$ ab OK
chicken S2 ^abx\*$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\*
chicken S2 ^abx\\*$ ab FAIL
chicken S2 ^ab+$ abb OK
chicken S2 ^ab\+$ abb FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\+
chicken S2 ^ab\\+$ abb FAIL
chicken S2 ^ab{1}$ ab OK
chicken S2 ^ab\{1}$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\{1\}$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\\{1\\}$ ab FAIL
chicken S2 ^ab{1,}$ abb OK
chicken S2 ^ab\{1,}$ abb FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\{1,\}$ abb FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\\{1,\\}$ abb FAIL
chicken S2 ^ab{1,2}$ abb OK
chicken S2 ^ab\{1,2}$ abb FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\{1,2\}$ abb FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken S2 ^ab\\{1,2\\}$ abb FAIL
chicken ax123 ^a(b)$ ab OK
chicken ax123 ^a\(b\)$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken ax123 ^a\\(b\\)$ ab FAIL
chicken ax123 ^(x|ab)$ ab OK
chicken ax123 ^\(x\|ab\)$ ab FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken ax123 ^\\(x\\|ab\\)$ ab FAIL
chicken ax5 ^a\_$ a\_ FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\_
chicken ax5 ^a\\_$ a\_ FAIL
chicken ax5 ^a\\\\_$ a\_ OK
chicken ax5 ^a\.b$ a.b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\.
chicken ax5 ^a\\.b$ a.b OK
chicken ax5 ^a*b$ a*b FAIL
chicken ax5 ^a\*b$ a*b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\*
chicken ax5 ^a\\*b$ a*b OK
chicken ax5 ^a[b$ a[b FAIL Error: incomplete char set
chicken ax5 ^a\[b$ a[b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\[
chicken ax5 ^a\\[b$ a[b OK
chicken ax5 ^a]b$ a]b OK
chicken ax5 ^a\]b$ a]b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\]
chicken ax5 ^a\\]b$ a]b OK
chicken ax5 ^a{b$ a{b OK
chicken ax5 ^a\{b$ a{b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken ax5 ^a\\{b$ a{b OK
chicken ax5 ^a}b$ a}b OK
chicken ax5 ^a\}b$ a}b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\}
chicken ax5 ^a\\}b$ a}b OK
chicken ax5 ^a{5}b$ a{5}b FAIL
chicken ax5 ^a\{5\}b$ a{5}b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken ax5 ^a\\{5\\}b$ a{5}b OK
chicken ax5 ^a(b$ a(b FAIL Error: unterminated parenthesis in regexp: "^a(b$"
chicken ax5 ^a\(b$ a(b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken ax5 ^a\\(b$ a(b OK
chicken ax5 ^a)b$ a)b FAIL Error: too many )'s in regexp: "^a)b$"
chicken ax5 ^a\)b$ a)b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\)
chicken ax5 ^a\\)b$ a)b OK
chicken ax5 ^(a|b)$ (a|b) FAIL
chicken ax5 ^\(a\|b\)$ (a|b) FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken ax5 ^\\(a\\|b\\)$ (a|b) OK
chicken ax5 ^a+b$ a+b FAIL
chicken ax5 ^a\+b$ a+b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\+
chicken ax5 ^a\\+b$ a+b OK
chicken ax5 ^a?b$ a?b FAIL
chicken ax5 ^a\?b$ a?b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\?
chicken ax5 ^a\\?b$ a?b OK
chicken ax5 ^a^b$ a^b FAIL
chicken ax5 ^a\^b$ a^b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\^
chicken ax5 ^a\\^b$ a^b OK
chicken ax5 ^a$b$ a$b FAIL
chicken ax5 ^a\$b$ a$b FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\$
chicken ax5 ^a\\$b$ a$b OK
chicken ax6 ^a[\]_$ a\_ FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\]
chicken ax6 ^a[\\]_$ a\_ FAIL Error: incomplete char set
chicken ax6 ^a[\\\\]_$ a\_ OK
chicken ax7 ^a[[:alpha:]]$ ab OK
chicken ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
ed version: GNU Ed 1.10
ed - ^a.$ ab OK
ed - ^[a]b$ ab OK
ed - ^[^b]b$ ab OK
ed S2 ^abx?$ ab FAIL ?
ed S2 ^abx\?$ ab OK
ed S2 ^abx\\?$ ab FAIL ?
ed S2 ^abx*$ ab OK
ed S2 ^abx\*$ ab FAIL ?
ed S2 ^abx\\*$ ab FAIL ?
ed S2 ^ab+$ abb FAIL ?
ed S2 ^ab\+$ abb OK
ed S2 ^ab\\+$ abb FAIL ?
ed S2 ^ab{1}$ ab FAIL ?
ed S2 ^ab\{1}$ ab FAIL ?
ed S2 ^ab\{1\}$ ab OK
ed S2 ^ab\\{1\\}$ ab FAIL ?
ed S2 ^ab{1,}$ abb FAIL ?
ed S2 ^ab\{1,}$ abb FAIL ?
ed S2 ^ab\{1,\}$ abb OK
ed S2 ^ab\\{1,\\}$ abb FAIL ?
ed S2 ^ab{1,2}$ abb FAIL ?
ed S2 ^ab\{1,2}$ abb FAIL ?
ed S2 ^ab\{1,2\}$ abb OK
ed S2 ^ab\\{1,2\\}$ abb FAIL ?
ed ax123 ^a(b)$ ab FAIL ?
ed ax123 ^a\(b\)$ ab OK
ed ax123 ^a\\(b\\)$ ab FAIL ?
ed ax123 ^(x|ab)$ ab FAIL ?
ed ax123 ^\(x\|ab\)$ ab OK
ed ax123 ^\\(x\\|ab\\)$ ab FAIL ?
ed ax5 ^a\_$ a\_ FAIL ?
ed ax5 ^a\\_$ a\_ OK
ed ax5 ^a\\\\_$ a\_ FAIL ?
ed ax5 ^a\.b$ a.b OK
ed ax5 ^a\\.b$ a.b FAIL ?
ed ax5 ^a*b$ a*b FAIL ?
ed ax5 ^a\*b$ a*b OK
ed ax5 ^a\\*b$ a*b FAIL ?
ed ax5 ^a[b$ a[b FAIL ?
ed ax5 ^a\[b$ a[b OK
ed ax5 ^a\\[b$ a[b FAIL ?
ed ax5 ^a]b$ a]b OK
ed ax5 ^a\]b$ a]b OK
ed ax5 ^a\\]b$ a]b FAIL ?
ed ax5 ^a{b$ a{b OK
ed ax5 ^a\{b$ a{b FAIL ?
ed ax5 ^a\\{b$ a{b FAIL ?
ed ax5 ^a}b$ a}b OK
ed ax5 ^a\}b$ a}b OK
ed ax5 ^a\\}b$ a}b FAIL ?
ed ax5 ^a{5}b$ a{5}b OK
ed ax5 ^a\{5\}b$ a{5}b FAIL ?
ed ax5 ^a\\{5\\}b$ a{5}b FAIL ?
ed ax5 ^a(b$ a(b OK
ed ax5 ^a\(b$ a(b FAIL ?
ed ax5 ^a\\(b$ a(b FAIL ?
ed ax5 ^a)b$ a)b OK
ed ax5 ^a\)b$ a)b FAIL ?
ed ax5 ^a\\)b$ a)b FAIL ?
ed ax5 ^(a|b)$ (a|b) OK
ed ax5 ^\(a\|b\)$ (a|b) FAIL ?
ed ax5 ^\\(a\\|b\\)$ (a|b) FAIL ?
ed ax5 ^a+b$ a+b OK
ed ax5 ^a\+b$ a+b FAIL ?
ed ax5 ^a\\+b$ a+b FAIL ?
ed ax5 ^a?b$ a?b OK
ed ax5 ^a\?b$ a?b FAIL ?
ed ax5 ^a\\?b$ a?b FAIL ?
ed ax5 ^a^b$ a^b OK
ed ax5 ^a\^b$ a^b OK
ed ax5 ^a\\^b$ a^b FAIL ?
ed ax5 ^a$b$ a$b OK
ed ax5 ^a\$b$ a$b OK
ed ax5 ^a\\$b$ a$b FAIL ?
ed ax6 ^a[\]_$ a\_ OK
ed ax6 ^a[\\]_$ a\_ OK
ed ax6 ^a[\\\\]_$ a\_ OK
ed ax7 ^a[[:alpha:]]$ ab OK
ed ax8 ^a[\t]b$ a<tab>b FAIL ?
----------------------------------------------------------
egrep version: grep (GNU grep) 3.1
egrep - ^a.$ ab OK
egrep - ^[a]b$ ab OK
egrep - ^[^b]b$ ab OK
egrep S2 ^abx?$ ab OK
egrep S2 ^abx\?$ ab FAIL
egrep S2 ^abx\\?$ ab FAIL
egrep S2 ^abx*$ ab OK
egrep S2 ^abx\*$ ab FAIL
egrep S2 ^abx\\*$ ab FAIL
egrep S2 ^ab+$ abb OK
egrep S2 ^ab\+$ abb FAIL
egrep S2 ^ab\\+$ abb FAIL
egrep S2 ^ab{1}$ ab OK
egrep S2 ^ab\{1}$ ab FAIL
egrep S2 ^ab\{1\}$ ab FAIL
egrep S2 ^ab\\{1\\}$ ab FAIL
egrep S2 ^ab{1,}$ abb OK
egrep S2 ^ab\{1,}$ abb FAIL
egrep S2 ^ab\{1,\}$ abb FAIL
egrep S2 ^ab\\{1,\\}$ abb FAIL
egrep S2 ^ab{1,2}$ abb OK
egrep S2 ^ab\{1,2}$ abb FAIL
egrep S2 ^ab\{1,2\}$ abb FAIL
egrep S2 ^ab\\{1,2\\}$ abb FAIL
egrep ax123 ^a(b)$ ab OK
egrep ax123 ^a\(b\)$ ab FAIL
egrep ax123 ^a\\(b\\)$ ab FAIL
egrep ax123 ^(x|ab)$ ab OK
egrep ax123 ^\(x\|ab\)$ ab FAIL
egrep ax123 ^\\(x\\|ab\\)$ ab FAIL
egrep ax5 ^a\_$ a\_ FAIL
egrep ax5 ^a\\_$ a\_ OK
egrep ax5 ^a\\\\_$ a\_ FAIL
egrep ax5 ^a\.b$ a.b OK
egrep ax5 ^a\\.b$ a.b FAIL
egrep ax5 ^a*b$ a*b FAIL
egrep ax5 ^a\*b$ a*b OK
egrep ax5 ^a\\*b$ a*b FAIL
egrep ax5 ^a[b$ a[b FAIL grep: Unmatched [ or [^
egrep ax5 ^a\[b$ a[b OK
egrep ax5 ^a\\[b$ a[b FAIL grep: Unmatched [ or [^
egrep ax5 ^a]b$ a]b OK
egrep ax5 ^a\]b$ a]b OK
egrep ax5 ^a\\]b$ a]b FAIL
egrep ax5 ^a{b$ a{b OK
egrep ax5 ^a\{b$ a{b OK
egrep ax5 ^a\\{b$ a{b FAIL
egrep ax5 ^a}b$ a}b OK
egrep ax5 ^a\}b$ a}b OK
egrep ax5 ^a\\}b$ a}b FAIL
egrep ax5 ^a{5}b$ a{5}b FAIL
egrep ax5 ^a\{5\}b$ a{5}b OK
egrep ax5 ^a\\{5\\}b$ a{5}b FAIL
egrep ax5 ^a(b$ a(b FAIL grep: Unmatched ( or \(
egrep ax5 ^a\(b$ a(b OK
egrep ax5 ^a\\(b$ a(b FAIL grep: Unmatched ( or \(
egrep ax5 ^a)b$ a)b OK
egrep ax5 ^a\)b$ a)b OK
egrep ax5 ^a\\)b$ a)b FAIL
egrep ax5 ^(a|b)$ (a|b) FAIL
egrep ax5 ^\(a\|b\)$ (a|b) OK
egrep ax5 ^\\(a\\|b\\)$ (a|b) FAIL
egrep ax5 ^a+b$ a+b FAIL
egrep ax5 ^a\+b$ a+b OK
egrep ax5 ^a\\+b$ a+b FAIL
egrep ax5 ^a?b$ a?b FAIL
egrep ax5 ^a\?b$ a?b OK
egrep ax5 ^a\\?b$ a?b FAIL
egrep ax5 ^a^b$ a^b FAIL
egrep ax5 ^a\^b$ a^b OK
egrep ax5 ^a\\^b$ a^b FAIL
egrep ax5 ^a$b$ a$b FAIL
egrep ax5 ^a\$b$ a$b OK
egrep ax5 ^a\\$b$ a$b FAIL
egrep ax6 ^a[\]_$ a\_ OK
egrep ax6 ^a[\\]_$ a\_ OK
egrep ax6 ^a[\\\\]_$ a\_ OK
egrep ax7 ^a[[:alpha:]]$ ab OK
egrep ax8 ^a[\t]b$ a<tab>b FAIL
----------------------------------------------------------
emacs version: GNU Emacs 25.2.2
emacs - ^a.$ ab OK
emacs - ^[a]b$ ab OK
emacs - ^[^b]b$ ab OK
emacs S2 ^abx?$ ab OK
emacs S2 ^abx\?$ ab OK
emacs S2 ^abx\\?$ ab FAIL ab
emacs S2 ^abx*$ ab OK
emacs S2 ^abx\*$ ab OK
emacs S2 ^abx\\*$ ab FAIL ab
emacs S2 ^ab+$ abb OK
emacs S2 ^ab\+$ abb OK
emacs S2 ^ab\\+$ abb FAIL abb
emacs S2 ^ab{1}$ ab FAIL ab
emacs S2 ^ab\{1}$ ab FAIL ab
emacs S2 ^ab\{1\}$ ab FAIL ab
emacs S2 ^ab\\{1\\}$ ab OK
emacs S2 ^ab{1,}$ abb FAIL abb
emacs S2 ^ab\{1,}$ abb FAIL abb
emacs S2 ^ab\{1,\}$ abb FAIL abb
emacs S2 ^ab\\{1,\\}$ abb OK
emacs S2 ^ab{1,2}$ abb FAIL abb
emacs S2 ^ab\{1,2}$ abb FAIL abb
emacs S2 ^ab\{1,2\}$ abb FAIL abb
emacs S2 ^ab\\{1,2\\}$ abb OK
emacs ax123 ^a(b)$ ab FAIL ab
emacs ax123 ^a\(b\)$ ab FAIL ab
emacs ax123 ^a\\(b\\)$ ab OK
emacs ax123 ^(x|ab)$ ab FAIL ab
emacs ax123 ^\(x\|ab\)$ ab FAIL ab
emacs ax123 ^\\(x\\|ab\\)$ ab OK
emacs ax5 ^a\_$ a\_ FAIL a\_
emacs ax5 ^a\\_$ a\_ FAIL Invalid regexp: "Invalid regular expression"
emacs ax5 ^a\\\\_$ a\_ OK
emacs ax5 ^a\.b$ a.b OK
emacs ax5 ^a\\.b$ a.b OK
emacs ax5 ^a*b$ a*b FAIL a*b
emacs ax5 ^a\*b$ a*b FAIL a*b
emacs ax5 ^a\\*b$ a*b OK
emacs ax5 ^a[b$ a[b FAIL Invalid regexp: "Unmatched [ or [^"
emacs ax5 ^a\[b$ a[b FAIL Invalid regexp: "Unmatched [ or [^"
emacs ax5 ^a\\[b$ a[b OK
emacs ax5 ^a]b$ a]b OK
emacs ax5 ^a\]b$ a]b OK
emacs ax5 ^a\\]b$ a]b OK
emacs ax5 ^a{b$ a{b OK
emacs ax5 ^a\{b$ a{b OK
emacs ax5 ^a\\{b$ a{b FAIL Invalid regexp: "Invalid content of \\{\\}"
emacs ax5 ^a}b$ a}b OK
emacs ax5 ^a\}b$ a}b OK
emacs ax5 ^a\\}b$ a}b OK
emacs ax5 ^a{5}b$ a{5}b OK
emacs ax5 ^a\{5\}b$ a{5}b OK
emacs ax5 ^a\\{5\\}b$ a{5}b FAIL a{5}b
emacs ax5 ^a(b$ a(b OK
emacs ax5 ^a\(b$ a(b OK
emacs ax5 ^a\\(b$ a(b FAIL Invalid regexp: "Unmatched ( or \\("
emacs ax5 ^a)b$ a)b OK
emacs ax5 ^a\)b$ a)b OK
emacs ax5 ^a\\)b$ a)b FAIL Invalid regexp: "Unmatched ) or \\)"
emacs ax5 ^(a|b)$ (a|b) OK
emacs ax5 ^\(a\|b\)$ (a|b) OK
emacs ax5 ^\\(a\\|b\\)$ (a|b) FAIL (a|b)
emacs ax5 ^a+b$ a+b FAIL a+b
emacs ax5 ^a\+b$ a+b FAIL a+b
emacs ax5 ^a\\+b$ a+b OK
emacs ax5 ^a?b$ a?b FAIL a?b
emacs ax5 ^a\?b$ a?b FAIL a?b
emacs ax5 ^a\\?b$ a?b OK
emacs ax5 ^a^b$ a^b OK
emacs ax5 ^a\^b$ a^b FAIL a^b
emacs ax5 ^a\\^b$ a^b OK
emacs ax5 ^a$b$ a$b OK
emacs ax5 ^a\$b$ a$b OK
emacs ax5 ^a\\$b$ a$b OK
emacs ax6 ^a[\]_$ a\_ FAIL Invalid regexp: "Unmatched [ or [^"
emacs ax6 ^a[\\]_$ a\_ OK
emacs ax6 ^a[\\\\]_$ a\_ OK
emacs ax7 ^a[[:alpha:]]$ ab OK
emacs ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
expect version: expect version 5.45.4
expect - ^a.$ ab OK
expect - ^[a]b$ ab OK
expect - ^[^b]b$ ab OK
expect S2 ^abx?$ ab OK
expect S2 ^abx\?$ ab FAIL
expect S2 ^abx\\?$ ab FAIL
expect S2 ^abx*$ ab OK
expect S2 ^abx\*$ ab FAIL
expect S2 ^abx\\*$ ab FAIL
expect S2 ^ab+$ abb OK
expect S2 ^ab\+$ abb FAIL
expect S2 ^ab\\+$ abb FAIL
expect S2 ^ab{1}$ ab OK
expect S2 ^ab\{1}$ ab FAIL extra characters after close-brace
expect S2 ^ab\{1\}$ ab FAIL
expect S2 ^ab\\{1\\}$ ab FAIL couldn't compile regular expression pattern: invalid repetition count(s)
expect S2 ^ab{1,}$ abb OK
expect S2 ^ab\{1,}$ abb FAIL extra characters after close-brace
expect S2 ^ab\{1,\}$ abb FAIL
expect S2 ^ab\\{1,\\}$ abb FAIL couldn't compile regular expression pattern: invalid repetition count(s)
expect S2 ^ab{1,2}$ abb OK
expect S2 ^ab\{1,2}$ abb FAIL extra characters after close-brace
expect S2 ^ab\{1,2\}$ abb FAIL
expect S2 ^ab\\{1,2\\}$ abb FAIL couldn't compile regular expression pattern: invalid repetition count(s)
expect ax123 ^a(b)$ ab OK
expect ax123 ^a\(b\)$ ab FAIL
expect ax123 ^a\\(b\\)$ ab FAIL
expect ax123 ^(x|ab)$ ab OK
expect ax123 ^\(x\|ab\)$ ab FAIL
expect ax123 ^\\(x\\|ab\\)$ ab FAIL
expect ax5 ^a\_$ a\_ FAIL
expect ax5 ^a\\_$ a\_ OK
expect ax5 ^a\\\\_$ a\_ FAIL
expect ax5 ^a\.b$ a.b OK
expect ax5 ^a\\.b$ a.b FAIL
expect ax5 ^a*b$ a*b FAIL
expect ax5 ^a\*b$ a*b OK
expect ax5 ^a\\*b$ a*b FAIL
expect ax5 ^a[b$ a[b FAIL couldn't compile regular expression pattern: brackets [] not balanced
expect ax5 ^a\[b$ a[b OK
expect ax5 ^a\\[b$ a[b FAIL couldn't compile regular expression pattern: brackets [] not balanced
expect ax5 ^a]b$ a]b OK
expect ax5 ^a\]b$ a]b OK
expect ax5 ^a\\]b$ a]b FAIL
expect ax5 ^a{b$ a{b FAIL missing close-brace
expect ax5 ^a\{b$ a{b OK
expect ax5 ^a\\{b$ a{b FAIL missing close-brace
expect ax5 ^a}b$ a}b FAIL extra characters after close-brace
expect ax5 ^a\}b$ a}b OK
expect ax5 ^a\\}b$ a}b FAIL extra characters after close-brace
expect ax5 ^a{5}b$ a{5}b FAIL
expect ax5 ^a\{5\}b$ a{5}b OK
expect ax5 ^a\\{5\\}b$ a{5}b FAIL couldn't compile regular expression pattern: invalid repetition count(s)
expect ax5 ^a(b$ a(b FAIL couldn't compile regular expression pattern: parentheses () not balanced
expect ax5 ^a\(b$ a(b OK
expect ax5 ^a\\(b$ a(b FAIL couldn't compile regular expression pattern: parentheses () not balanced
expect ax5 ^a)b$ a)b FAIL couldn't compile regular expression pattern: parentheses () not balanced
expect ax5 ^a\)b$ a)b OK
expect ax5 ^a\\)b$ a)b FAIL couldn't compile regular expression pattern: parentheses () not balanced
expect ax5 ^(a|b)$ (a|b) FAIL
expect ax5 ^\(a\|b\)$ (a|b) OK
expect ax5 ^\\(a\\|b\\)$ (a|b) FAIL
expect ax5 ^a+b$ a+b FAIL
expect ax5 ^a\+b$ a+b OK
expect ax5 ^a\\+b$ a+b FAIL
expect ax5 ^a?b$ a?b FAIL
expect ax5 ^a\?b$ a?b OK
expect ax5 ^a\\?b$ a?b FAIL
expect ax5 ^a^b$ a^b FAIL
expect ax5 ^a\^b$ a^b OK
expect ax5 ^a\\^b$ a^b FAIL
expect ax5 ^a$b$ a$b FAIL
expect ax5 ^a\$b$ a$b OK
expect ax5 ^a\\$b$ a$b FAIL
expect ax6 ^a[\]_$ a\_ FAIL couldn't compile regular expression pattern: brackets [] not balanced
expect ax6 ^a[\\]_$ a\_ OK
expect ax6 ^a[\\\\]_$ a\_ OK
expect ax7 ^a[[:alpha:]]$ ab OK
expect ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
find version: find (GNU findutils) 4.7.0-git
find - ^a.$ ab OK
find - ^[a]b$ ab OK
find - ^[^b]b$ ab OK
find S2 ^abx?$ ab OK
find S2 ^abx\?$ ab FAIL
find S2 ^abx\\?$ ab FAIL
find S2 ^abx*$ ab OK
find S2 ^abx\*$ ab FAIL
find S2 ^abx\\*$ ab FAIL
find S2 ^ab+$ abb OK
find S2 ^ab\+$ abb FAIL
find S2 ^ab\\+$ abb FAIL
find S2 ^ab{1}$ ab OK
find S2 ^ab\{1}$ ab FAIL
find S2 ^ab\{1\}$ ab FAIL
find S2 ^ab\\{1\\}$ ab FAIL ab\\{1\\}$': Invalid content of \{\}
find S2 ^ab{1,}$ abb OK
find S2 ^ab\{1,}$ abb FAIL
find S2 ^ab\{1,\}$ abb FAIL
find S2 ^ab\\{1,\\}$ abb FAIL ab\\{1,\\}$': Invalid content of \{\}
find S2 ^ab{1,2}$ abb OK
find S2 ^ab\{1,2}$ abb FAIL
find S2 ^ab\{1,2\}$ abb FAIL
find S2 ^ab\\{1,2\\}$ abb FAIL ab\\{1,2\\}$': Invalid content of \{\}
find ax123 ^a(b)$ ab OK
find ax123 ^a\(b\)$ ab FAIL
find ax123 ^a\\(b\\)$ ab FAIL
find ax123 ^(x|ab)$ ab OK
find ax123 ^\(x\|ab\)$ ab FAIL
find ax123 ^\\(x\\|ab\\)$ ab FAIL
find ax5 ^a\_$ a\_ FAIL
find ax5 ^a\\_$ a\_ OK
find ax5 ^a\\\\_$ a\_ FAIL
find ax5 ^a\.b$ a.b OK
find ax5 ^a\\.b$ a.b FAIL
find ax5 ^a*b$ a*b FAIL
find ax5 ^a\*b$ a*b OK
find ax5 ^a\\*b$ a*b FAIL
find ax5 ^a[b$ a[b FAIL a[b$': Unmatched [ or [^
find ax5 ^a\[b$ a[b OK
find ax5 ^a\\[b$ a[b FAIL a\\[b$': Unmatched [ or [^
find ax5 ^a]b$ a]b OK
find ax5 ^a\]b$ a]b OK
find ax5 ^a\\]b$ a]b FAIL
find ax5 ^a{b$ a{b FAIL a{b$': Unmatched \{
find ax5 ^a\{b$ a{b OK
find ax5 ^a\\{b$ a{b FAIL a\\{b$': Unmatched \{
find ax5 ^a}b$ a}b OK
find ax5 ^a\}b$ a}b OK
find ax5 ^a\\}b$ a}b FAIL
find ax5 ^a{5}b$ a{5}b FAIL
find ax5 ^a\{5\}b$ a{5}b OK
find ax5 ^a\\{5\\}b$ a{5}b FAIL a\\{5\\}b$': Invalid content of \{\}
find ax5 ^a(b$ a(b FAIL a(b$': Unmatched ( or \(
find ax5 ^a\(b$ a(b OK
find ax5 ^a\\(b$ a(b FAIL a\\(b$': Unmatched ( or \(
find ax5 ^a)b$ a)b OK
find ax5 ^a\)b$ a)b OK
find ax5 ^a\\)b$ a)b FAIL
find ax5 ^(a|b)$ (a|b) FAIL
find ax5 ^\(a\|b\)$ (a|b) OK
find ax5 ^\\(a\\|b\\)$ (a|b) FAIL
find ax5 ^a+b$ a+b FAIL
find ax5 ^a\+b$ a+b OK
find ax5 ^a\\+b$ a+b FAIL
find ax5 ^a?b$ a?b FAIL
find ax5 ^a\?b$ a?b OK
find ax5 ^a\\?b$ a?b FAIL
find ax5 ^a^b$ a^b FAIL
find ax5 ^a\^b$ a^b OK
find ax5 ^a\\^b$ a^b FAIL
find ax5 ^a$b$ a$b FAIL
find ax5 ^a\$b$ a$b OK
find ax5 ^a\\$b$ a$b FAIL
find ax6 ^a[\]_$ a\_ OK
find ax6 ^a[\\]_$ a\_ OK
find ax6 ^a[\\\\]_$ a\_ OK
find ax7 ^a[[:alpha:]]$ ab OK
find ax8 ^a[\t]b$ a<tab>b FAIL
----------------------------------------------------------
gawk version: GNU Awk 4.1.4
gawk - ^a.$ ab OK
gawk - ^[a]b$ ab OK
gawk - ^[^b]b$ ab OK
gawk S2 ^abx?$ ab OK
gawk S2 ^abx\?$ ab FAIL ab
gawk S2 ^abx\\?$ ab FAIL ab
gawk S2 ^abx*$ ab OK
gawk S2 ^abx\*$ ab FAIL ab
gawk S2 ^abx\\*$ ab FAIL ab
gawk S2 ^ab+$ abb OK
gawk S2 ^ab\+$ abb FAIL abb
gawk S2 ^ab\\+$ abb FAIL abb
gawk S2 ^ab{1}$ ab OK
gawk S2 ^ab\{1}$ ab FAIL ab
gawk S2 ^ab\{1\}$ ab FAIL ab
gawk S2 ^ab\\{1\\}$ ab FAIL ab
gawk S2 ^ab{1,}$ abb OK
gawk S2 ^ab\{1,}$ abb FAIL abb
gawk S2 ^ab\{1,\}$ abb FAIL abb
gawk S2 ^ab\\{1,\\}$ abb FAIL abb
gawk S2 ^ab{1,2}$ abb OK
gawk S2 ^ab\{1,2}$ abb FAIL abb
gawk S2 ^ab\{1,2\}$ abb FAIL abb
gawk S2 ^ab\\{1,2\\}$ abb FAIL abb
gawk ax123 ^a(b)$ ab OK
gawk ax123 ^a\(b\)$ ab FAIL ab
gawk ax123 ^a\\(b\\)$ ab FAIL ab
gawk ax123 ^(x|ab)$ ab OK
gawk ax123 ^\(x\|ab\)$ ab FAIL ab
gawk ax123 ^\\(x\\|ab\\)$ ab FAIL ab
gawk ax5 ^a\_$ a\_ FAIL a\_
gawk ax5 ^a\\_$ a\_ OK
gawk ax5 ^a\\\\_$ a\_ FAIL a\_
gawk ax5 ^a\.b$ a.b OK
gawk ax5 ^a\\.b$ a.b FAIL a.b
gawk ax5 ^a*b$ a*b FAIL a*b
gawk ax5 ^a\*b$ a*b OK
gawk ax5 ^a\\*b$ a*b FAIL a*b
gawk ax5 ^a[b$ a[b FAIL gawk: cmd. line:1: { sub(/^a[b$/, "x") ; print }
gawk ax5 ^a\[b$ a[b OK
gawk ax5 ^a\\[b$ a[b FAIL gawk: cmd. line:1: { sub(/^a\\[b$/, "x") ; print }
gawk ax5 ^a]b$ a]b OK
gawk ax5 ^a\]b$ a]b OK
gawk ax5 ^a\\]b$ a]b FAIL a]b
gawk ax5 ^a{b$ a{b OK
gawk ax5 ^a\{b$ a{b OK
gawk ax5 ^a\\{b$ a{b FAIL a{b
gawk ax5 ^a}b$ a}b OK
gawk ax5 ^a\}b$ a}b OK
gawk ax5 ^a\\}b$ a}b FAIL a}b
gawk ax5 ^a{5}b$ a{5}b FAIL a{5}b
gawk ax5 ^a\{5\}b$ a{5}b OK
gawk ax5 ^a\\{5\\}b$ a{5}b FAIL a{5}b
gawk ax5 ^a(b$ a(b FAIL gawk: cmd. line:1: error: Unmatched ( or \(: /^a(b$/
gawk ax5 ^a\(b$ a(b OK
gawk ax5 ^a\\(b$ a(b FAIL gawk: cmd. line:1: error: Unmatched ( or \(: /^a\\(b$/
gawk ax5 ^a)b$ a)b OK
gawk ax5 ^a\)b$ a)b OK
gawk ax5 ^a\\)b$ a)b FAIL a)b
gawk ax5 ^(a|b)$ (a|b) FAIL (a|b)
gawk ax5 ^\(a\|b\)$ (a|b) OK
gawk ax5 ^\\(a\\|b\\)$ (a|b) FAIL (a|b)
gawk ax5 ^a+b$ a+b FAIL a+b
gawk ax5 ^a\+b$ a+b OK
gawk ax5 ^a\\+b$ a+b FAIL a+b
gawk ax5 ^a?b$ a?b FAIL a?b
gawk ax5 ^a\?b$ a?b OK
gawk ax5 ^a\\?b$ a?b FAIL a?b
gawk ax5 ^a^b$ a^b FAIL a^b
gawk ax5 ^a\^b$ a^b OK
gawk ax5 ^a\\^b$ a^b FAIL a^b
gawk ax5 ^a$b$ a$b FAIL a$b
gawk ax5 ^a\$b$ a$b OK
gawk ax5 ^a\\$b$ a$b FAIL a$b
gawk ax6 ^a[\]_$ a\_ FAIL gawk: cmd. line:1: { sub(/^a[\]_$/, "x") ; print }
gawk ax6 ^a[\\]_$ a\_ OK
gawk ax6 ^a[\\\\]_$ a\_ OK
gawk ax7 ^a[[:alpha:]]$ ab OK
gawk ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
grep version: grep (GNU grep) 3.1
grep - ^a.$ ab OK
grep - ^[a]b$ ab OK
grep - ^[^b]b$ ab OK
grep S2 ^abx?$ ab FAIL
grep S2 ^abx\?$ ab OK
grep S2 ^abx\\?$ ab FAIL
grep S2 ^abx*$ ab OK
grep S2 ^abx\*$ ab FAIL
grep S2 ^abx\\*$ ab FAIL
grep S2 ^ab+$ abb FAIL
grep S2 ^ab\+$ abb OK
grep S2 ^ab\\+$ abb FAIL
grep S2 ^ab{1}$ ab FAIL
grep S2 ^ab\{1}$ ab FAIL grep: Unmatched \{
grep S2 ^ab\{1\}$ ab OK
grep S2 ^ab\\{1\\}$ ab FAIL
grep S2 ^ab{1,}$ abb FAIL
grep S2 ^ab\{1,}$ abb FAIL grep: Unmatched \{
grep S2 ^ab\{1,\}$ abb OK
grep S2 ^ab\\{1,\\}$ abb FAIL
grep S2 ^ab{1,2}$ abb FAIL
grep S2 ^ab\{1,2}$ abb FAIL grep: Unmatched \{
grep S2 ^ab\{1,2\}$ abb OK
grep S2 ^ab\\{1,2\\}$ abb FAIL
grep ax123 ^a(b)$ ab FAIL
grep ax123 ^a\(b\)$ ab OK
grep ax123 ^a\\(b\\)$ ab FAIL
grep ax123 ^(x|ab)$ ab FAIL
grep ax123 ^\(x\|ab\)$ ab OK
grep ax123 ^\\(x\\|ab\\)$ ab FAIL
grep ax5 ^a\_$ a\_ FAIL
grep ax5 ^a\\_$ a\_ OK
grep ax5 ^a\\\\_$ a\_ FAIL
grep ax5 ^a\.b$ a.b OK
grep ax5 ^a\\.b$ a.b FAIL
grep ax5 ^a*b$ a*b FAIL
grep ax5 ^a\*b$ a*b OK
grep ax5 ^a\\*b$ a*b FAIL
grep ax5 ^a[b$ a[b FAIL grep: Unmatched [ or [^
grep ax5 ^a\[b$ a[b OK
grep ax5 ^a\\[b$ a[b FAIL grep: Unmatched [ or [^
grep ax5 ^a]b$ a]b OK
grep ax5 ^a\]b$ a]b OK
grep ax5 ^a\\]b$ a]b FAIL
grep ax5 ^a{b$ a{b OK
grep ax5 ^a\{b$ a{b FAIL grep: Unmatched \{
grep ax5 ^a\\{b$ a{b FAIL
grep ax5 ^a}b$ a}b OK
grep ax5 ^a\}b$ a}b OK
grep ax5 ^a\\}b$ a}b FAIL
grep ax5 ^a{5}b$ a{5}b OK
grep ax5 ^a\{5\}b$ a{5}b FAIL
grep ax5 ^a\\{5\\}b$ a{5}b FAIL
grep ax5 ^a(b$ a(b OK
grep ax5 ^a\(b$ a(b FAIL grep: Unmatched ( or \(
grep ax5 ^a\\(b$ a(b FAIL
grep ax5 ^a)b$ a)b OK
grep ax5 ^a\)b$ a)b FAIL grep: Unmatched ) or \)
grep ax5 ^a\\)b$ a)b FAIL
grep ax5 ^(a|b)$ (a|b) OK
grep ax5 ^\(a\|b\)$ (a|b) FAIL
grep ax5 ^\\(a\\|b\\)$ (a|b) FAIL
grep ax5 ^a+b$ a+b OK
grep ax5 ^a\+b$ a+b FAIL
grep ax5 ^a\\+b$ a+b FAIL
grep ax5 ^a?b$ a?b OK
grep ax5 ^a\?b$ a?b FAIL
grep ax5 ^a\\?b$ a?b FAIL
grep ax5 ^a^b$ a^b OK
grep ax5 ^a\^b$ a^b OK
grep ax5 ^a\\^b$ a^b FAIL
grep ax5 ^a$b$ a$b OK
grep ax5 ^a\$b$ a$b OK
grep ax5 ^a\\$b$ a$b FAIL
grep ax6 ^a[\]_$ a\_ OK
grep ax6 ^a[\\]_$ a\_ OK
grep ax6 ^a[\\\\]_$ a\_ OK
grep ax7 ^a[[:alpha:]]$ ab OK
grep ax8 ^a[\t]b$ a<tab>b FAIL
----------------------------------------------------------
javascript version: node v8.10.0
javascript - ^a.$ ab OK
javascript - ^[a]b$ ab OK
javascript - ^[^b]b$ ab OK
javascript S2 ^abx?$ ab OK
javascript S2 ^abx\?$ ab FAIL ab
javascript S2 ^abx\\?$ ab FAIL ab
javascript S2 ^abx*$ ab OK
javascript S2 ^abx\*$ ab FAIL ab
javascript S2 ^abx\\*$ ab FAIL ab
javascript S2 ^ab+$ abb OK
javascript S2 ^ab\+$ abb FAIL abb
javascript S2 ^ab\\+$ abb FAIL abb
javascript S2 ^ab{1}$ ab OK
javascript S2 ^ab\{1}$ ab FAIL ab
javascript S2 ^ab\{1\}$ ab FAIL ab
javascript S2 ^ab\\{1\\}$ ab FAIL ab
javascript S2 ^ab{1,}$ abb OK
javascript S2 ^ab\{1,}$ abb FAIL abb
javascript S2 ^ab\{1,\}$ abb FAIL abb
javascript S2 ^ab\\{1,\\}$ abb FAIL abb
javascript S2 ^ab{1,2}$ abb OK
javascript S2 ^ab\{1,2}$ abb FAIL abb
javascript S2 ^ab\{1,2\}$ abb FAIL abb
javascript S2 ^ab\\{1,2\\}$ abb FAIL abb
javascript ax123 ^a(b)$ ab OK
javascript ax123 ^a\(b\)$ ab FAIL ab
javascript ax123 ^a\\(b\\)$ ab FAIL ab
javascript ax123 ^(x|ab)$ ab OK
javascript ax123 ^\(x\|ab\)$ ab FAIL ab
javascript ax123 ^\\(x\\|ab\\)$ ab FAIL ab
javascript ax5 ^a\_$ a\_ FAIL a\_
javascript ax5 ^a\\_$ a\_ OK
javascript ax5 ^a\\\\_$ a\_ FAIL a\_
javascript ax5 ^a\.b$ a.b OK
javascript ax5 ^a\\.b$ a.b FAIL a.b
javascript ax5 ^a*b$ a*b FAIL a*b
javascript ax5 ^a\*b$ a*b OK
javascript ax5 ^a\\*b$ a*b FAIL a*b
javascript ax5 ^a[b$ a[b FAIL [eval]:1
javascript ax5 ^a\[b$ a[b OK
javascript ax5 ^a\\[b$ a[b FAIL [eval]:1
javascript ax5 ^a]b$ a]b OK
javascript ax5 ^a\]b$ a]b OK
javascript ax5 ^a\\]b$ a]b FAIL a]b
javascript ax5 ^a{b$ a{b OK
javascript ax5 ^a\{b$ a{b OK
javascript ax5 ^a\\{b$ a{b FAIL a{b
javascript ax5 ^a}b$ a}b OK
javascript ax5 ^a\}b$ a}b OK
javascript ax5 ^a\\}b$ a}b FAIL a}b
javascript ax5 ^a{5}b$ a{5}b FAIL a{5}b
javascript ax5 ^a\{5\}b$ a{5}b OK
javascript ax5 ^a\\{5\\}b$ a{5}b FAIL a{5}b
javascript ax5 ^a(b$ a(b FAIL [eval]:1
javascript ax5 ^a\(b$ a(b OK
javascript ax5 ^a\\(b$ a(b FAIL [eval]:1
javascript ax5 ^a)b$ a)b FAIL [eval]:1
javascript ax5 ^a\)b$ a)b OK
javascript ax5 ^a\\)b$ a)b FAIL [eval]:1
javascript ax5 ^(a|b)$ (a|b) FAIL (a|b)
javascript ax5 ^\(a\|b\)$ (a|b) OK
javascript ax5 ^\\(a\\|b\\)$ (a|b) FAIL (a|b)
javascript ax5 ^a+b$ a+b FAIL a+b
javascript ax5 ^a\+b$ a+b OK
javascript ax5 ^a\\+b$ a+b FAIL a+b
javascript ax5 ^a?b$ a?b FAIL a?b
javascript ax5 ^a\?b$ a?b OK
javascript ax5 ^a\\?b$ a?b FAIL a?b
javascript ax5 ^a^b$ a^b FAIL a^b
javascript ax5 ^a\^b$ a^b OK
javascript ax5 ^a\\^b$ a^b FAIL a^b
javascript ax5 ^a$b$ a$b FAIL a$b
javascript ax5 ^a\$b$ a$b OK
javascript ax5 ^a\\$b$ a$b FAIL a$b
javascript ax6 ^a[\]_$ a\_ FAIL [eval]:1
javascript ax6 ^a[\\]_$ a\_ OK
javascript ax6 ^a[\\\\]_$ a\_ OK
javascript ax7 ^a[[:alpha:]]$ ab FAIL ab
javascript ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
lex version: flex 2.6.4
lex - ^a.$ ab OK
lex - ^[a]b$ ab OK
lex - ^[^b]b$ ab OK
lex S2 ^abx?$ ab OK
lex S2 ^abx\?$ ab FAIL
lex S2 ^abx\\?$ ab FAIL
lex S2 ^abx*$ ab OK
lex S2 ^abx\*$ ab FAIL
lex S2 ^abx\\*$ ab FAIL
lex S2 ^ab+$ abb OK
lex S2 ^ab\+$ abb FAIL
lex S2 ^ab\\+$ abb FAIL
lex S2 ^ab{1}$ ab OK
lex S2 ^ab\{1}$ ab FAIL tmp.lex.1.l:6: unrecognized rule
lex S2 ^ab\{1\}$ ab FAIL
lex S2 ^ab\\{1\\}$ ab FAIL tmp.lex.1.l:6: bad character inside {}'s
lex S2 ^ab{1,}$ abb OK
lex S2 ^ab\{1,}$ abb FAIL tmp.lex.1.l:6: unrecognized rule
lex S2 ^ab\{1,\}$ abb FAIL
lex S2 ^ab\\{1,\\}$ abb FAIL tmp.lex.1.l:6: bad character inside {}'s
lex S2 ^ab{1,2}$ abb OK
lex S2 ^ab\{1,2}$ abb FAIL tmp.lex.1.l:6: unrecognized rule
lex S2 ^ab\{1,2\}$ abb FAIL
lex S2 ^ab\\{1,2\\}$ abb FAIL tmp.lex.1.l:6: bad character inside {}'s
lex ax123 ^a(b)$ ab OK
lex ax123 ^a\(b\)$ ab FAIL
lex ax123 ^a\\(b\\)$ ab FAIL
lex ax123 ^(x|ab)$ ab OK
lex ax123 ^\(x\|ab\)$ ab FAIL
lex ax123 ^\\(x\\|ab\\)$ ab FAIL
lex ax5 ^a\_$ a\_ FAIL
lex ax5 ^a\\_$ a\_ OK
lex ax5 ^a\\\\_$ a\_ FAIL
lex ax5 ^a\.b$ a.b OK
lex ax5 ^a\\.b$ a.b FAIL
lex ax5 ^a*b$ a*b FAIL
lex ax5 ^a\*b$ a*b OK
lex ax5 ^a\\*b$ a*b FAIL
lex ax5 ^a[b$ a[b FAIL tmp.lex.1.l:6: bad character class
lex ax5 ^a\[b$ a[b OK
lex ax5 ^a\\[b$ a[b FAIL tmp.lex.1.l:6: bad character class
lex ax5 ^a]b$ a]b OK
lex ax5 ^a\]b$ a]b OK
lex ax5 ^a\\]b$ a]b FAIL
lex ax5 ^a{b$ a{b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a\{b$ a{b OK
lex ax5 ^a\\{b$ a{b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a}b$ a}b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a\}b$ a}b OK
lex ax5 ^a\\}b$ a}b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a{5}b$ a{5}b FAIL
lex ax5 ^a\{5\}b$ a{5}b OK
lex ax5 ^a\\{5\\}b$ a{5}b FAIL tmp.lex.1.l:6: bad character inside {}'s
lex ax5 ^a(b$ a(b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a\(b$ a(b OK
lex ax5 ^a\\(b$ a(b FAIL tmp.lex.1.l:6: unrecognized rule
lex ax5 ^a)b$ a)b FAIL tmp.lex.1.l:6: unbalanced parenthesis
lex ax5 ^a\)b$ a)b OK
lex ax5 ^a\\)b$ a)b FAIL tmp.lex.1.l:6: unbalanced parenthesis
lex ax5 ^(a|b)$ (a|b) FAIL
lex ax5 ^\(a\|b\)$ (a|b) OK
lex ax5 ^\\(a\\|b\\)$ (a|b) FAIL
lex ax5 ^a+b$ a+b FAIL
lex ax5 ^a\+b$ a+b OK
lex ax5 ^a\\+b$ a+b FAIL
lex ax5 ^a?b$ a?b FAIL
lex ax5 ^a\?b$ a?b OK
lex ax5 ^a\\?b$ a?b FAIL
lex ax5 ^a^b$ a^b OK
lex ax5 ^a\^b$ a^b OK
lex ax5 ^a\\^b$ a^b FAIL
lex ax5 ^a$b$ a$b OK
lex ax5 ^a\$b$ a$b OK
lex ax5 ^a\\$b$ a$b FAIL
lex ax6 ^a[\]_$ a\_ FAIL tmp.lex.1.l:6: bad character class
lex ax6 ^a[\\]_$ a\_ OK
lex ax6 ^a[\\\\]_$ a\_ OK
lex ax7 ^a[[:alpha:]]$ ab OK
lex ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
mawk version: mawk 1.3.3 Nov 1996
mawk - ^a.$ ab OK
mawk - ^[a]b$ ab OK
mawk - ^[^b]b$ ab OK
mawk S2 ^abx?$ ab OK
mawk S2 ^abx\?$ ab FAIL ab
mawk S2 ^abx\\?$ ab FAIL ab
mawk S2 ^abx*$ ab OK
mawk S2 ^abx\*$ ab FAIL ab
mawk S2 ^abx\\*$ ab FAIL ab
mawk S2 ^ab+$ abb OK
mawk S2 ^ab\+$ abb FAIL abb
mawk S2 ^ab\\+$ abb FAIL abb
mawk S2 ^ab{1}$ ab FAIL ab
mawk S2 ^ab\{1}$ ab FAIL ab
mawk S2 ^ab\{1\}$ ab FAIL ab
mawk S2 ^ab\\{1\\}$ ab FAIL ab
mawk S2 ^ab{1,}$ abb FAIL abb
mawk S2 ^ab\{1,}$ abb FAIL abb
mawk S2 ^ab\{1,\}$ abb FAIL abb
mawk S2 ^ab\\{1,\\}$ abb FAIL abb
mawk S2 ^ab{1,2}$ abb FAIL abb
mawk S2 ^ab\{1,2}$ abb FAIL abb
mawk S2 ^ab\{1,2\}$ abb FAIL abb
mawk S2 ^ab\\{1,2\\}$ abb FAIL abb
mawk ax123 ^a(b)$ ab OK
mawk ax123 ^a\(b\)$ ab FAIL ab
mawk ax123 ^a\\(b\\)$ ab FAIL ab
mawk ax123 ^(x|ab)$ ab OK
mawk ax123 ^\(x\|ab\)$ ab FAIL ab
mawk ax123 ^\\(x\\|ab\\)$ ab FAIL ab
mawk ax5 ^a\_$ a\_ FAIL a\_
mawk ax5 ^a\\_$ a\_ OK
mawk ax5 ^a\\\\_$ a\_ FAIL a\_
mawk ax5 ^a\.b$ a.b OK
mawk ax5 ^a\\.b$ a.b FAIL a.b
mawk ax5 ^a*b$ a*b FAIL a*b
mawk ax5 ^a\*b$ a*b OK
mawk ax5 ^a\\*b$ a*b FAIL a*b
mawk ax5 ^a[b$ a[b FAIL mawk: line 1: regular expression compile failed (bad class -- [], [^] or [)
mawk ax5 ^a\[b$ a[b OK
mawk ax5 ^a\\[b$ a[b FAIL mawk: line 1: regular expression compile failed (bad class -- [], [^] or [)
mawk ax5 ^a]b$ a]b OK
mawk ax5 ^a\]b$ a]b OK
mawk ax5 ^a\\]b$ a]b FAIL a]b
mawk ax5 ^a{b$ a{b OK
mawk ax5 ^a\{b$ a{b OK
mawk ax5 ^a\\{b$ a{b FAIL a{b
mawk ax5 ^a}b$ a}b OK
mawk ax5 ^a\}b$ a}b OK
mawk ax5 ^a\\}b$ a}b FAIL a}b
mawk ax5 ^a{5}b$ a{5}b OK
mawk ax5 ^a\{5\}b$ a{5}b OK
mawk ax5 ^a\\{5\\}b$ a{5}b FAIL a{5}b
mawk ax5 ^a(b$ a(b FAIL mawk: line 1: regular expression compile failed (missing ')')
mawk ax5 ^a\(b$ a(b OK
mawk ax5 ^a\\(b$ a(b FAIL mawk: line 1: regular expression compile failed (missing ')')
mawk ax5 ^a)b$ a)b FAIL mawk: line 1: regular expression compile failed (missing '(')
mawk ax5 ^a\)b$ a)b OK
mawk ax5 ^a\\)b$ a)b FAIL mawk: line 1: regular expression compile failed (missing '(')
mawk ax5 ^(a|b)$ (a|b) FAIL (a|b)
mawk ax5 ^\(a\|b\)$ (a|b) OK
mawk ax5 ^\\(a\\|b\\)$ (a|b) FAIL (a|b)
mawk ax5 ^a+b$ a+b FAIL a+b
mawk ax5 ^a\+b$ a+b OK
mawk ax5 ^a\\+b$ a+b FAIL a+b
mawk ax5 ^a?b$ a?b FAIL a?b
mawk ax5 ^a\?b$ a?b OK
mawk ax5 ^a\\?b$ a?b FAIL a?b
mawk ax5 ^a^b$ a^b FAIL a^b
mawk ax5 ^a\^b$ a^b OK
mawk ax5 ^a\\^b$ a^b FAIL a^b
mawk ax5 ^a$b$ a$b FAIL a$b
mawk ax5 ^a\$b$ a$b OK
mawk ax5 ^a\\$b$ a$b FAIL a$b
mawk ax6 ^a[\]_$ a\_ FAIL mawk: line 1: regular expression compile failed (bad class -- [], [^] or [)
mawk ax6 ^a[\\]_$ a\_ OK
mawk ax6 ^a[\\\\]_$ a\_ OK
mawk ax7 ^a[[:alpha:]]$ ab FAIL ab
mawk ax8 ^a[\t]b$ a<tab>b OK
----------------------------------------------------------
mysql version: mysql Ver 14.14 Distrib 5.7.29
mysql - ^a.$ ab OK
mysql - ^[a]b$ ab OK
mysql - ^[^b]b$ ab OK
mysql S2 ^abx?$ ab OK
mysql S2 ^abx\?$ ab OK
mysql S2 ^abx\\?$ ab FAIL 0
mysql S2 ^abx*$ ab OK
mysql S2 ^abx\*$ ab OK
mysql S2 ^abx\\*$ ab FAIL 0
mysql S2 ^ab+$ abb OK
mysql S2 ^ab\+$ abb OK
mysql S2 ^ab\\+$ abb FAIL 0
mysql S2 ^ab{1}$ ab OK
mysql S2 ^ab\{1}$ ab OK
mysql S2 ^ab\{1\}$ ab OK
mysql S2 ^ab\\{1\\}$ ab FAIL 0
mysql S2 ^ab{1,}$ abb OK
mysql S2 ^ab\{1,}$ abb OK
mysql S2 ^ab\{1,\}$ abb OK
mysql S2 ^ab\\{1,\\}$ abb FAIL 0
mysql S2 ^ab{1,2}$ abb OK
mysql S2 ^ab\{1,2}$ abb OK
mysql S2 ^ab\{1,2\}$ abb OK
mysql S2 ^ab\\{1,2\\}$ abb FAIL 0
mysql ax123 ^a(b)$ ab OK
mysql ax123 ^a\(b\)$ ab OK
mysql ax123 ^a\\(b\\)$ ab FAIL 0