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
mysql         ax123     ^(x|ab)$            ab        OK
mysql         ax123     ^\(x\|ab\)$         ab        OK
mysql         ax123     ^\\(x\\|ab\\)$      ab        FAIL 0
mysql         ax5       ^a\_$               a\_       FAIL 0
mysql         ax5       ^a\\_$              a\_       FAIL 0
mysql         ax5       ^a\\\\_$            a\_       OK
mysql         ax5       ^a\.b$              a.b       OK
mysql         ax5       ^a\\.b$             a.b       OK
mysql         ax5       ^a*b$               a*b       FAIL 0
mysql         ax5       ^a\*b$              a*b       FAIL 0
mysql         ax5       ^a\\*b$             a*b       OK
mysql         ax5       ^a[b$               a[b       FAIL ERROR 1139 (42000) at line 1: Got error 'brackets ([ ]) not balanced' from regexp
mysql         ax5       ^a\[b$              a[b       FAIL ERROR 1139 (42000) at line 1: Got error 'brackets ([ ]) not balanced' from regexp
mysql         ax5       ^a\\[b$             a[b       OK
mysql         ax5       ^a]b$               a]b       OK
mysql         ax5       ^a\]b$              a]b       OK
mysql         ax5       ^a\\]b$             a]b       OK
mysql         ax5       ^a{b$               a{b       OK
mysql         ax5       ^a\{b$              a{b       OK
mysql         ax5       ^a\\{b$             a{b       OK
mysql         ax5       ^a}b$               a}b       OK
mysql         ax5       ^a\}b$              a}b       OK
mysql         ax5       ^a\\}b$             a}b       OK
mysql         ax5       ^a{5}b$             a{5}b     FAIL 0
mysql         ax5       ^a\{5\}b$           a{5}b     FAIL 0
mysql         ax5       ^a\\{5\\}b$         a{5}b     OK
mysql         ax5       ^a(b$               a(b       FAIL ERROR 1139 (42000) at line 1: Got error 'parentheses not balanced' from regexp
mysql         ax5       ^a\(b$              a(b       FAIL ERROR 1139 (42000) at line 1: Got error 'parentheses not balanced' from regexp
mysql         ax5       ^a\\(b$             a(b       OK
mysql         ax5       ^a)b$               a)b       OK
mysql         ax5       ^a\)b$              a)b       OK
mysql         ax5       ^a\\)b$             a)b       OK
mysql         ax5       ^(a|b)$             (a|b)     FAIL 0
mysql         ax5       ^\(a\|b\)$          (a|b)     FAIL 0
mysql         ax5       ^\\(a\\|b\\)$       (a|b)     OK
mysql         ax5       ^a+b$               a+b       FAIL 0
mysql         ax5       ^a\+b$              a+b       FAIL 0
mysql         ax5       ^a\\+b$             a+b       OK
mysql         ax5       ^a?b$               a?b       FAIL 0
mysql         ax5       ^a\?b$              a?b       FAIL 0
mysql         ax5       ^a\\?b$             a?b       OK
mysql         ax5       ^a^b$               a^b       FAIL 0
mysql         ax5       ^a\^b$              a^b       FAIL 0
mysql         ax5       ^a\\^b$             a^b       OK
mysql         ax5       ^a$b$               a$b       FAIL 0
mysql         ax5       ^a\$b$              a$b       FAIL 0
mysql         ax5       ^a\\$b$             a$b       OK
mysql         ax6       ^a[\]_$             a\_       FAIL ERROR 1139 (42000) at line 1: Got error 'brackets ([ ]) not balanced' from regexp
mysql         ax6       ^a[\\]_$            a\_       OK
mysql         ax6       ^a[\\\\]_$          a\_       OK
mysql         ax7       ^a[[:alpha:]]$      ab        OK
mysql         ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
perl version: perl v5.26.1
perl          -         ^a.$                ab        OK
perl          -         ^[a]b$              ab        OK
perl          -         ^[^b]b$             ab        OK
perl          S2        ^abx?$              ab        OK
perl          S2        ^abx\?$             ab        FAIL ab
perl          S2        ^abx\\?$            ab        FAIL ab
perl          S2        ^abx*$              ab        OK
perl          S2        ^abx\*$             ab        FAIL ab
perl          S2        ^abx\\*$            ab        FAIL ab
perl          S2        ^ab+$               abb       OK
perl          S2        ^ab\+$              abb       FAIL abb
perl          S2        ^ab\\+$             abb       FAIL abb
perl          S2        ^ab{1}$             ab        OK
perl          S2        ^ab\{1}$            ab        FAIL ab
perl          S2        ^ab\{1\}$           ab        FAIL ab
perl          S2        ^ab\\{1\\}$         ab        FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^ab\\{ <-- HERE 1\\}$/ at -e line 1.
perl          S2        ^ab{1,}$            abb       OK
perl          S2        ^ab\{1,}$           abb       FAIL abb
perl          S2        ^ab\{1,\}$          abb       FAIL abb
perl          S2        ^ab\\{1,\\}$        abb       FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^ab\\{ <-- HERE 1,\\}$/ at -e line 1.
perl          S2        ^ab{1,2}$           abb       OK
perl          S2        ^ab\{1,2}$          abb       FAIL abb
perl          S2        ^ab\{1,2\}$         abb       FAIL abb
perl          S2        ^ab\\{1,2\\}$       abb       FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^ab\\{ <-- HERE 1,2\\}$/ at -e line 1.
perl          ax123     ^a(b)$              ab        OK
perl          ax123     ^a\(b\)$            ab        FAIL ab
perl          ax123     ^a\\(b\\)$          ab        FAIL ab
perl          ax123     ^(x|ab)$            ab        OK
perl          ax123     ^\(x\|ab\)$         ab        FAIL ab
perl          ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
perl          ax5       ^a\_$               a\_       FAIL a\_
perl          ax5       ^a\\_$              a\_       OK
perl          ax5       ^a\\\\_$            a\_       FAIL a\_
perl          ax5       ^a\.b$              a.b       OK
perl          ax5       ^a\\.b$             a.b       FAIL a.b
perl          ax5       ^a*b$               a*b       FAIL a*b
perl          ax5       ^a\*b$              a*b       OK
perl          ax5       ^a\\*b$             a*b       FAIL a*b
perl          ax5       ^a[b$               a[b       FAIL Unmatched [ in regex; marked by <-- HERE in m/^a[ <-- HERE b$/ at -e line 1.
perl          ax5       ^a\[b$              a[b       OK
perl          ax5       ^a\\[b$             a[b       FAIL Unmatched [ in regex; marked by <-- HERE in m/^a\\[ <-- HERE b$/ at -e line 1.
perl          ax5       ^a]b$               a]b       OK
perl          ax5       ^a\]b$              a]b       OK
perl          ax5       ^a\\]b$             a]b       FAIL a]b
perl          ax5       ^a{b$               a{b       FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^a{ <-- HERE b$/ at -e line 1.
perl          ax5       ^a\{b$              a{b       OK
perl          ax5       ^a\\{b$             a{b       FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^a\\{ <-- HERE b$/ at -e line 1.
perl          ax5       ^a}b$               a}b       OK
perl          ax5       ^a\}b$              a}b       OK
perl          ax5       ^a\\}b$             a}b       FAIL a}b
perl          ax5       ^a{5}b$             a{5}b     FAIL a{5}b
perl          ax5       ^a\{5\}b$           a{5}b     OK
perl          ax5       ^a\\{5\\}b$         a{5}b     FAIL Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^a\\{ <-- HERE 5\\}b$/ at -e line 1.
perl          ax5       ^a(b$               a(b       FAIL Unmatched ( in regex; marked by <-- HERE in m/^a( <-- HERE b$/ at -e line 1.
perl          ax5       ^a\(b$              a(b       OK
perl          ax5       ^a\\(b$             a(b       FAIL Unmatched ( in regex; marked by <-- HERE in m/^a\\( <-- HERE b$/ at -e line 1.
perl          ax5       ^a)b$               a)b       FAIL Unmatched ) in regex; marked by <-- HERE in m/^a) <-- HERE b$/ at -e line 1.
perl          ax5       ^a\)b$              a)b       OK
perl          ax5       ^a\\)b$             a)b       FAIL Unmatched ) in regex; marked by <-- HERE in m/^a\\) <-- HERE b$/ at -e line 1.
perl          ax5       ^(a|b)$             (a|b)     FAIL (a|b)
perl          ax5       ^\(a\|b\)$          (a|b)     OK
perl          ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
perl          ax5       ^a+b$               a+b       FAIL a+b
perl          ax5       ^a\+b$              a+b       OK
perl          ax5       ^a\\+b$             a+b       FAIL a+b
perl          ax5       ^a?b$               a?b       FAIL a?b
perl          ax5       ^a\?b$              a?b       OK
perl          ax5       ^a\\?b$             a?b       FAIL a?b
perl          ax5       ^a^b$               a^b       FAIL a^b
perl          ax5       ^a\^b$              a^b       OK
perl          ax5       ^a\\^b$             a^b       FAIL a^b
perl          ax5       ^a$b$               a$b       FAIL a$b
perl          ax5       ^a\$b$              a$b       OK
perl          ax5       ^a\\$b$             a$b       FAIL a$b
perl          ax6       ^a[\]_$             a\_       FAIL Unmatched [ in regex; marked by <-- HERE in m/^a[ <-- HERE \]_$/ at -e line 1.
perl          ax6       ^a[\\]_$            a\_       OK
perl          ax6       ^a[\\\\]_$          a\_       OK
perl          ax7       ^a[[:alpha:]]$      ab        OK
perl          ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
php version: PHP 7.2.24-0ubuntu0.18.04.4
php           -         ^a.$                ab        OK
php           -         ^[a]b$              ab        OK
php           -         ^[^b]b$             ab        OK
php           S2        ^abx?$              ab        OK
php           S2        ^abx\?$             ab        FAIL ab
php           S2        ^abx\\?$            ab        FAIL ab
php           S2        ^abx*$              ab        OK
php           S2        ^abx\*$             ab        FAIL ab
php           S2        ^abx\\*$            ab        FAIL ab
php           S2        ^ab+$               abb       OK
php           S2        ^ab\+$              abb       FAIL abb
php           S2        ^ab\\+$             abb       FAIL abb
php           S2        ^ab{1}$             ab        OK
php           S2        ^ab\{1}$            ab        FAIL ab
php           S2        ^ab\{1\}$           ab        FAIL ab
php           S2        ^ab\\{1\\}$         ab        FAIL ab
php           S2        ^ab{1,}$            abb       OK
php           S2        ^ab\{1,}$           abb       FAIL abb
php           S2        ^ab\{1,\}$          abb       FAIL abb
php           S2        ^ab\\{1,\\}$        abb       FAIL abb
php           S2        ^ab{1,2}$           abb       OK
php           S2        ^ab\{1,2}$          abb       FAIL abb
php           S2        ^ab\{1,2\}$         abb       FAIL abb
php           S2        ^ab\\{1,2\\}$       abb       FAIL abb
php           ax123     ^a(b)$              ab        OK
php           ax123     ^a\(b\)$            ab        FAIL ab
php           ax123     ^a\\(b\\)$          ab        FAIL ab
php           ax123     ^(x|ab)$            ab        OK
php           ax123     ^\(x\|ab\)$         ab        FAIL ab
php           ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
php           ax5       ^a\_$               a\_       FAIL a\_
php           ax5       ^a\\_$              a\_       FAIL a\_
php           ax5       ^a\\\\_$            a\_       OK
php           ax5       ^a\.b$              a.b       OK
php           ax5       ^a\\.b$             a.b       OK
php           ax5       ^a*b$               a*b       FAIL a*b
php           ax5       ^a\*b$              a*b       OK
php           ax5       ^a\\*b$             a*b       OK
php           ax5       ^a[b$               a[b       FAIL PHP Warning:  preg_replace(): Compilation failed: missing terminating ] for character class at offset 5 in Standard input code on line 1
php           ax5       ^a\[b$              a[b       OK
php           ax5       ^a\\[b$             a[b       OK
php           ax5       ^a]b$               a]b       OK
php           ax5       ^a\]b$              a]b       OK
php           ax5       ^a\\]b$             a]b       OK
php           ax5       ^a{b$               a{b       OK
php           ax5       ^a\{b$              a{b       OK
php           ax5       ^a\\{b$             a{b       OK
php           ax5       ^a}b$               a}b       OK
php           ax5       ^a\}b$              a}b       OK
php           ax5       ^a\\}b$             a}b       OK
php           ax5       ^a{5}b$             a{5}b     FAIL a{5}b
php           ax5       ^a\{5\}b$           a{5}b     OK
php           ax5       ^a\\{5\\}b$         a{5}b     OK
php           ax5       ^a(b$               a(b       FAIL PHP Warning:  preg_replace(): Compilation failed: missing ) at offset 5 in Standard input code on line 1
php           ax5       ^a\(b$              a(b       OK
php           ax5       ^a\\(b$             a(b       OK
php           ax5       ^a)b$               a)b       FAIL PHP Warning:  preg_replace(): Compilation failed: unmatched parentheses at offset 2 in Standard input code on line 1
php           ax5       ^a\)b$              a)b       OK
php           ax5       ^a\\)b$             a)b       OK
php           ax5       ^(a|b)$             (a|b)     FAIL (a|b)
php           ax5       ^\(a\|b\)$          (a|b)     OK
php           ax5       ^\\(a\\|b\\)$       (a|b)     OK
php           ax5       ^a+b$               a+b       FAIL a+b
php           ax5       ^a\+b$              a+b       OK
php           ax5       ^a\\+b$             a+b       OK
php           ax5       ^a?b$               a?b       FAIL a?b
php           ax5       ^a\?b$              a?b       OK
php           ax5       ^a\\?b$             a?b       OK
php           ax5       ^a^b$               a^b       FAIL a^b
php           ax5       ^a\^b$              a^b       OK
php           ax5       ^a\\^b$             a^b       OK
php           ax5       ^a$b$               a$b       FAIL a$b
php           ax5       ^a\$b$              a$b       OK
php           ax5       ^a\\$b$             a$b       OK
php           ax6       ^a[\]_$             a\_       FAIL PHP Warning:  preg_replace(): Compilation failed: missing terminating ] for character class at offset 7 in Standard input code on line 1
php           ax6       ^a[\\]_$            a\_       FAIL PHP Warning:  preg_replace(): Compilation failed: missing terminating ] for character class at offset 7 in Standard input code on line 1
php           ax6       ^a[\\\\]_$          a\_       OK
php           ax7       ^a[[:alpha:]]$      ab        OK
php           ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
postgres version: psql (PostgreSQL) 10.12
postgres      -         ^a.$                ab        OK
postgres      -         ^[a]b$              ab        OK
postgres      -         ^[^b]b$             ab        OK
postgres      S2        ^abx?$              ab        OK
postgres      S2        ^abx\?$             ab        FAIL ab
postgres      S2        ^abx\\?$            ab        FAIL ab
postgres      S2        ^abx*$              ab        OK
postgres      S2        ^abx\*$             ab        FAIL ab
postgres      S2        ^abx\\*$            ab        FAIL ab
postgres      S2        ^ab+$               abb       OK
postgres      S2        ^ab\+$              abb       FAIL abb
postgres      S2        ^ab\\+$             abb       FAIL abb
postgres      S2        ^ab{1}$             ab        OK
postgres      S2        ^ab\{1}$            ab        FAIL ab
postgres      S2        ^ab\{1\}$           ab        FAIL ab
postgres      S2        ^ab\\{1\\}$         ab        FAIL ERROR:  invalid regular expression: invalid repetition count(s)
postgres      S2        ^ab{1,}$            abb       OK
postgres      S2        ^ab\{1,}$           abb       FAIL abb
postgres      S2        ^ab\{1,\}$          abb       FAIL abb
postgres      S2        ^ab\\{1,\\}$        abb       FAIL ERROR:  invalid regular expression: invalid repetition count(s)
postgres      S2        ^ab{1,2}$           abb       OK
postgres      S2        ^ab\{1,2}$          abb       FAIL abb
postgres      S2        ^ab\{1,2\}$         abb       FAIL abb
postgres      S2        ^ab\\{1,2\\}$       abb       FAIL ERROR:  invalid regular expression: invalid repetition count(s)
postgres      ax123     ^a(b)$              ab        OK
postgres      ax123     ^a\(b\)$            ab        FAIL ab
postgres      ax123     ^a\\(b\\)$          ab        FAIL ab
postgres      ax123     ^(x|ab)$            ab        OK
postgres      ax123     ^\(x\|ab\)$         ab        FAIL ab
postgres      ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
postgres      ax5       ^a\_$               a\_       FAIL a\_
postgres      ax5       ^a\\_$              a\_       OK
postgres      ax5       ^a\\\\_$            a\_       FAIL a\_
postgres      ax5       ^a\.b$              a.b       OK
postgres      ax5       ^a\\.b$             a.b       FAIL a.b
postgres      ax5       ^a*b$               a*b       FAIL a*b
postgres      ax5       ^a\*b$              a*b       OK
postgres      ax5       ^a\\*b$             a*b       FAIL a*b
postgres      ax5       ^a[b$               a[b       FAIL ERROR:  invalid regular expression: brackets [] not balanced
postgres      ax5       ^a\[b$              a[b       OK
postgres      ax5       ^a\\[b$             a[b       FAIL ERROR:  invalid regular expression: brackets [] not balanced
postgres      ax5       ^a]b$               a]b       OK
postgres      ax5       ^a\]b$              a]b       OK
postgres      ax5       ^a\\]b$             a]b       FAIL a]b
postgres      ax5       ^a{b$               a{b       OK
postgres      ax5       ^a\{b$              a{b       OK
postgres      ax5       ^a\\{b$             a{b       FAIL a{b
postgres      ax5       ^a}b$               a}b       OK
postgres      ax5       ^a\}b$              a}b       OK
postgres      ax5       ^a\\}b$             a}b       FAIL a}b
postgres      ax5       ^a{5}b$             a{5}b     FAIL a{5}b
postgres      ax5       ^a\{5\}b$           a{5}b     OK
postgres      ax5       ^a\\{5\\}b$         a{5}b     FAIL ERROR:  invalid regular expression: invalid repetition count(s)
postgres      ax5       ^a(b$               a(b       FAIL ERROR:  invalid regular expression: parentheses () not balanced
postgres      ax5       ^a\(b$              a(b       OK
postgres      ax5       ^a\\(b$             a(b       FAIL ERROR:  invalid regular expression: parentheses () not balanced
postgres      ax5       ^a)b$               a)b       FAIL ERROR:  invalid regular expression: parentheses () not balanced
postgres      ax5       ^a\)b$              a)b       OK
postgres      ax5       ^a\\)b$             a)b       FAIL ERROR:  invalid regular expression: parentheses () not balanced
postgres      ax5       ^(a|b)$             (a|b)     FAIL (a|b)
postgres      ax5       ^\(a\|b\)$          (a|b)     OK
postgres      ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
postgres      ax5       ^a+b$               a+b       FAIL a+b
postgres      ax5       ^a\+b$              a+b       OK
postgres      ax5       ^a\\+b$             a+b       FAIL a+b
postgres      ax5       ^a?b$               a?b       FAIL a?b
postgres      ax5       ^a\?b$              a?b       OK
postgres      ax5       ^a\\?b$             a?b       FAIL a?b
postgres      ax5       ^a^b$               a^b       FAIL a^b
postgres      ax5       ^a\^b$              a^b       OK
postgres      ax5       ^a\\^b$             a^b       FAIL a^b
postgres      ax5       ^a$b$               a$b       FAIL a$b
postgres      ax5       ^a\$b$              a$b       OK
postgres      ax5       ^a\\$b$             a$b       FAIL a$b
postgres      ax6       ^a[\]_$             a\_       FAIL ERROR:  invalid regular expression: brackets [] not balanced
postgres      ax6       ^a[\\]_$            a\_       OK
postgres      ax6       ^a[\\\\]_$          a\_       OK
postgres      ax7       ^a[[:alpha:]]$      ab        OK
postgres      ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
procmail version: procmail v3.23pre 2001/09/13
procmail      -         ^a.$                ab        OK
procmail      -         ^[a]b$              ab        OK
procmail      -         ^[^b]b$             ab        OK
procmail      S2        ^abx?$              ab        OK
procmail      S2        ^abx\?$             ab        FAIL No match on "^abx\?$"
procmail      S2        ^abx\\?$            ab        FAIL No match on "^abx\\?$"
procmail      S2        ^abx*$              ab        OK
procmail      S2        ^abx\*$             ab        FAIL No match on "^abx\*$"
procmail      S2        ^abx\\*$            ab        FAIL No match on "^abx\\*$"
procmail      S2        ^ab+$               abb       OK
procmail      S2        ^ab\+$              abb       FAIL No match on "^ab\+$"
procmail      S2        ^ab\\+$             abb       FAIL No match on "^ab\\+$"
procmail      S2        ^ab{1}$             ab        FAIL No match on "^ab{1}$"
procmail      S2        ^ab\{1}$            ab        FAIL No match on "^ab\{1}$"
procmail      S2        ^ab\{1\}$           ab        FAIL No match on "^ab\{1\}$"
procmail      S2        ^ab\\{1\\}$         ab        FAIL No match on "^ab\\{1\\}$"
procmail      S2        ^ab{1,}$            abb       FAIL No match on "^ab{1,}$"
procmail      S2        ^ab\{1,}$           abb       FAIL No match on "^ab\{1,}$"
procmail      S2        ^ab\{1,\}$          abb       FAIL No match on "^ab\{1,\}$"
procmail      S2        ^ab\\{1,\\}$        abb       FAIL No match on "^ab\\{1,\\}$"
procmail      S2        ^ab{1,2}$           abb       FAIL No match on "^ab{1,2}$"
procmail      S2        ^ab\{1,2}$          abb       FAIL No match on "^ab\{1,2}$"
procmail      S2        ^ab\{1,2\}$         abb       FAIL No match on "^ab\{1,2\}$"
procmail      S2        ^ab\\{1,2\\}$       abb       FAIL No match on "^ab\\{1,2\\}$"
procmail      ax123     ^a(b)$              ab        OK
procmail      ax123     ^a\(b\)$            ab        FAIL No match on "^a\(b\)$"
procmail      ax123     ^a\\(b\\)$          ab        FAIL No match on "^a\\(b\\)$"
procmail      ax123     ^(x|ab)$            ab        OK
procmail      ax123     ^\(x\|ab\)$         ab        FAIL No match on "^\(x\|ab\)$"
procmail      ax123     ^\\(x\\|ab\\)$      ab        FAIL No match on "^\\(x\\|ab\\)$"
procmail      ax5       ^a\_$               a\_       FAIL No match on "^a\_$"
procmail      ax5       ^a\\_$              a\_       OK
procmail      ax5       ^a\\\\_$            a\_       FAIL No match on "^a\\\\_$"
procmail      ax5       ^a\.b$              a.b       OK
procmail      ax5       ^a\\.b$             a.b       FAIL No match on "^a\\.b$"
procmail      ax5       ^a*b$               a*b       FAIL No match on "^a*b$"
procmail      ax5       ^a\*b$              a*b       OK
procmail      ax5       ^a\\*b$             a*b       FAIL No match on "^a\\*b$"
procmail      ax5       ^a[b$               a[b       FAIL No match on "^a[b$"
procmail      ax5       ^a\[b$              a[b       OK
procmail      ax5       ^a\\[b$             a[b       FAIL No match on "^a\\[b$"
procmail      ax5       ^a]b$               a]b       OK
procmail      ax5       ^a\]b$              a]b       OK
procmail      ax5       ^a\\]b$             a]b       FAIL No match on "^a\\]b$"
procmail      ax5       ^a{b$               a{b       OK
procmail      ax5       ^a\{b$              a{b       OK
procmail      ax5       ^a\\{b$             a{b       FAIL No match on "^a\\{b$"
procmail      ax5       ^a}b$               a}b       OK
procmail      ax5       ^a\}b$              a}b       OK
procmail      ax5       ^a\\}b$             a}b       FAIL No match on "^a\\}b$"
procmail      ax5       ^a{5}b$             a{5}b     OK
procmail      ax5       ^a\{5\}b$           a{5}b     OK
procmail      ax5       ^a\\{5\\}b$         a{5}b     FAIL No match on "^a\\{5\\}b$"
procmail      ax5       ^a(b$               a(b       FAIL Invalid regexp "^a(b$"
procmail      ax5       ^a\(b$              a(b       OK
procmail      ax5       ^a\\(b$             a(b       FAIL Invalid regexp "^a\\(b$"
procmail      ax5       ^a)b$               a)b       FAIL Invalid regexp "^a)b$"
procmail      ax5       ^a\)b$              a)b       OK
procmail      ax5       ^a\\)b$             a)b       FAIL Invalid regexp "^a\\)b$"
procmail      ax5       ^(a|b)$             (a|b)     FAIL No match on "^(a|b)$"
procmail      ax5       ^\(a\|b\)$          (a|b)     OK
procmail      ax5       ^\\(a\\|b\\)$       (a|b)     FAIL No match on "^\\(a\\|b\\)$"
procmail      ax5       ^a+b$               a+b       FAIL No match on "^a+b$"
procmail      ax5       ^a\+b$              a+b       OK
procmail      ax5       ^a\\+b$             a+b       FAIL No match on "^a\\+b$"
procmail      ax5       ^a?b$               a?b       FAIL No match on "^a?b$"
procmail      ax5       ^a\?b$              a?b       OK
procmail      ax5       ^a\\?b$             a?b       FAIL No match on "^a\\?b$"
procmail      ax5       ^a^b$               a^b       FAIL No match on "^a^b$"
procmail      ax5       ^a\^b$              a^b       OK
procmail      ax5       ^a\\^b$             a^b       FAIL No match on "^a\\^b$"
procmail      ax5       ^a$b$               a$b       FAIL No match on "^a$b$"
procmail      ax5       ^a\$b$              a$b       OK
procmail      ax5       ^a\\$b$             a$b       FAIL No match on "^a\\$b$"
procmail      ax6       ^a[\]_$             a\_       OK
procmail      ax6       ^a[\\]_$            a\_       OK
procmail      ax6       ^a[\\\\]_$          a\_       OK
procmail      ax7       ^a[[:alpha:]]$      ab        FAIL No match on "^a[[:alpha:]]$"
procmail      ax8       ^a[\t]b$            a<tab>b   FAIL No match on "^a[\t]b$"
----------------------------------------------------------
python version: Python 3.6.9
python        -         ^a.$                ab        OK
python        -         ^[a]b$              ab        OK
python        -         ^[^b]b$             ab        OK
python        S2        ^abx?$              ab        OK
python        S2        ^abx\?$             ab        FAIL ab
python        S2        ^abx\\?$            ab        FAIL ab
python        S2        ^abx*$              ab        OK
python        S2        ^abx\*$             ab        FAIL ab
python        S2        ^abx\\*$            ab        FAIL ab
python        S2        ^ab+$               abb       OK
python        S2        ^ab\+$              abb       FAIL abb
python        S2        ^ab\\+$             abb       FAIL abb
python        S2        ^ab{1}$             ab        OK
python        S2        ^ab\{1}$            ab        FAIL ab
python        S2        ^ab\{1\}$           ab        FAIL ab
python        S2        ^ab\\{1\\}$         ab        FAIL ab
python        S2        ^ab{1,}$            abb       OK
python        S2        ^ab\{1,}$           abb       FAIL abb
python        S2        ^ab\{1,\}$          abb       FAIL abb
python        S2        ^ab\\{1,\\}$        abb       FAIL abb
python        S2        ^ab{1,2}$           abb       OK
python        S2        ^ab\{1,2}$          abb       FAIL abb
python        S2        ^ab\{1,2\}$         abb       FAIL abb
python        S2        ^ab\\{1,2\\}$       abb       FAIL abb
python        ax123     ^a(b)$              ab        OK
python        ax123     ^a\(b\)$            ab        FAIL ab
python        ax123     ^a\\(b\\)$          ab        FAIL ab
python        ax123     ^(x|ab)$            ab        OK
python        ax123     ^\(x\|ab\)$         ab        FAIL ab
python        ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
python        ax5       ^a\_$               a\_       FAIL a\_
python        ax5       ^a\\_$              a\_       OK
python        ax5       ^a\\\\_$            a\_       FAIL a\_
python        ax5       ^a\.b$              a.b       OK
python        ax5       ^a\\.b$             a.b       FAIL a.b
python        ax5       ^a*b$               a*b       FAIL a*b
python        ax5       ^a\*b$              a*b       OK
python        ax5       ^a\\*b$             a*b       FAIL a*b
python        ax5       ^a[b$               a[b       FAIL unterminated character set at position 2
python        ax5       ^a\[b$              a[b       OK
python        ax5       ^a\\[b$             a[b       FAIL unterminated character set at position 4
python        ax5       ^a]b$               a]b       OK
python        ax5       ^a\]b$              a]b       OK
python        ax5       ^a\\]b$             a]b       FAIL a]b
python        ax5       ^a{b$               a{b       OK
python        ax5       ^a\{b$              a{b       OK
python        ax5       ^a\\{b$             a{b       FAIL a{b
python        ax5       ^a}b$               a}b       OK
python        ax5       ^a\}b$              a}b       OK
python        ax5       ^a\\}b$             a}b       FAIL a}b
python        ax5       ^a{5}b$             a{5}b     FAIL a{5}b
python        ax5       ^a\{5\}b$           a{5}b     OK
python        ax5       ^a\\{5\\}b$         a{5}b     FAIL a{5}b
python        ax5       ^a(b$               a(b       FAIL missing ), unterminated subpattern at position 2
python        ax5       ^a\(b$              a(b       OK
python        ax5       ^a\\(b$             a(b       FAIL missing ), unterminated subpattern at position 4
python        ax5       ^a)b$               a)b       FAIL unbalanced parenthesis at position 2
python        ax5       ^a\)b$              a)b       OK
python        ax5       ^a\\)b$             a)b       FAIL unbalanced parenthesis at position 4
python        ax5       ^(a|b)$             (a|b)     FAIL (a|b)
python        ax5       ^\(a\|b\)$          (a|b)     OK
python        ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
python        ax5       ^a+b$               a+b       FAIL a+b
python        ax5       ^a\+b$              a+b       OK
python        ax5       ^a\\+b$             a+b       FAIL a+b
python        ax5       ^a?b$               a?b       FAIL a?b
python        ax5       ^a\?b$              a?b       OK
python        ax5       ^a\\?b$             a?b       FAIL a?b
python        ax5       ^a^b$               a^b       FAIL a^b
python        ax5       ^a\^b$              a^b       OK
python        ax5       ^a\\^b$             a^b       FAIL a^b
python        ax5       ^a$b$               a$b       FAIL a$b
python        ax5       ^a\$b$              a$b       OK
python        ax5       ^a\\$b$             a$b       FAIL a$b
python        ax6       ^a[\]_$             a\_       FAIL unterminated character set at position 2
python        ax6       ^a[\\]_$            a\_       OK
python        ax6       ^a[\\\\]_$          a\_       OK
python        ax7       ^a[[:alpha:]]$      ab        FAIL ab
python        ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
sed version: sed (GNU sed) 4.4
sed           -         ^a.$                ab        OK
sed           -         ^[a]b$              ab        OK
sed           -         ^[^b]b$             ab        OK
sed           S2        ^abx?$              ab        FAIL ab
sed           S2        ^abx\?$             ab        OK
sed           S2        ^abx\\?$            ab        FAIL ab
sed           S2        ^abx*$              ab        OK
sed           S2        ^abx\*$             ab        FAIL ab
sed           S2        ^abx\\*$            ab        FAIL ab
sed           S2        ^ab+$               abb       FAIL abb
sed           S2        ^ab\+$              abb       OK
sed           S2        ^ab\\+$             abb       FAIL abb
sed           S2        ^ab{1}$             ab        FAIL ab
sed           S2        ^ab\{1}$            ab        FAIL sed: -e expression #1, char 13: Unmatched \{
sed           S2        ^ab\{1\}$           ab        OK
sed           S2        ^ab\\{1\\}$         ab        FAIL ab
sed           S2        ^ab{1,}$            abb       FAIL abb
sed           S2        ^ab\{1,}$           abb       FAIL sed: -e expression #1, char 14: Unmatched \{
sed           S2        ^ab\{1,\}$          abb       OK
sed           S2        ^ab\\{1,\\}$        abb       FAIL abb
sed           S2        ^ab{1,2}$           abb       FAIL abb
sed           S2        ^ab\{1,2}$          abb       FAIL sed: -e expression #1, char 15: Unmatched \{
sed           S2        ^ab\{1,2\}$         abb       OK
sed           S2        ^ab\\{1,2\\}$       abb       FAIL abb
sed           ax123     ^a(b)$              ab        FAIL ab
sed           ax123     ^a\(b\)$            ab        OK
sed           ax123     ^a\\(b\\)$          ab        FAIL ab
sed           ax123     ^(x|ab)$            ab        FAIL ab
sed           ax123     ^\(x\|ab\)$         ab        OK
sed           ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
sed           ax5       ^a\_$               a\_       FAIL a\_
sed           ax5       ^a\\_$              a\_       OK
sed           ax5       ^a\\\\_$            a\_       FAIL a\_
sed           ax5       ^a\.b$              a.b       OK
sed           ax5       ^a\\.b$             a.b       FAIL a.b
sed           ax5       ^a*b$               a*b       FAIL a*b
sed           ax5       ^a\*b$              a*b       OK
sed           ax5       ^a\\*b$             a*b       FAIL a*b
sed           ax5       ^a[b$               a[b       FAIL sed: -e expression #1, char 10: unterminated `s' command
sed           ax5       ^a\[b$              a[b       OK
sed           ax5       ^a\\[b$             a[b       FAIL sed: -e expression #1, char 12: unterminated `s' command
sed           ax5       ^a]b$               a]b       OK
sed           ax5       ^a\]b$              a]b       OK
sed           ax5       ^a\\]b$             a]b       FAIL a]b
sed           ax5       ^a{b$               a{b       OK
sed           ax5       ^a\{b$              a{b       FAIL sed: -e expression #1, char 11: Unmatched \{
sed           ax5       ^a\\{b$             a{b       FAIL a{b
sed           ax5       ^a}b$               a}b       OK
sed           ax5       ^a\}b$              a}b       OK
sed           ax5       ^a\\}b$             a}b       FAIL a}b
sed           ax5       ^a{5}b$             a{5}b     OK
sed           ax5       ^a\{5\}b$           a{5}b     FAIL a{5}b
sed           ax5       ^a\\{5\\}b$         a{5}b     FAIL a{5}b
sed           ax5       ^a(b$               a(b       OK
sed           ax5       ^a\(b$              a(b       FAIL sed: -e expression #1, char 11: Unmatched ( or \(
sed           ax5       ^a\\(b$             a(b       FAIL a(b
sed           ax5       ^a)b$               a)b       OK
sed           ax5       ^a\)b$              a)b       FAIL sed: -e expression #1, char 11: Unmatched ) or \)
sed           ax5       ^a\\)b$             a)b       FAIL a)b
sed           ax5       ^(a|b)$             (a|b)     OK
sed           ax5       ^\(a\|b\)$          (a|b)     FAIL (a|b)
sed           ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
sed           ax5       ^a+b$               a+b       OK
sed           ax5       ^a\+b$              a+b       FAIL a+b
sed           ax5       ^a\\+b$             a+b       FAIL a+b
sed           ax5       ^a?b$               a?b       OK
sed           ax5       ^a\?b$              a?b       FAIL a?b
sed           ax5       ^a\\?b$             a?b       FAIL a?b
sed           ax5       ^a^b$               a^b       OK
sed           ax5       ^a\^b$              a^b       OK
sed           ax5       ^a\\^b$             a^b       FAIL a^b
sed           ax5       ^a$b$               a$b       OK
sed           ax5       ^a\$b$              a$b       OK
sed           ax5       ^a\\$b$             a$b       FAIL a$b
sed           ax6       ^a[\]_$             a\_       OK
sed           ax6       ^a[\\]_$            a\_       OK
sed           ax6       ^a[\\\\]_$          a\_       OK
sed           ax7       ^a[[:alpha:]]$      ab        OK
sed           ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
tcl version: tcl 8.6
tcl           -         ^a.$                ab        OK
tcl           -         ^[a]b$              ab        OK
tcl           -         ^[^b]b$             ab        OK
tcl           S2        ^abx?$              ab        OK
tcl           S2        ^abx\?$             ab        FAIL ab
tcl           S2        ^abx\\?$            ab        FAIL ab
tcl           S2        ^abx*$              ab        OK
tcl           S2        ^abx\*$             ab        FAIL ab
tcl           S2        ^abx\\*$            ab        FAIL ab
tcl           S2        ^ab+$               abb       OK
tcl           S2        ^ab\+$              abb       FAIL abb
tcl           S2        ^ab\\+$             abb       FAIL abb
tcl           S2        ^ab{1}$             ab        OK
tcl           S2        ^ab\{1}$            ab        FAIL extra characters after close-brace
tcl           S2        ^ab\{1\}$           ab        FAIL ab
tcl           S2        ^ab\\{1\\}$         ab        FAIL couldn't compile regular expression pattern: invalid repetition count(s)
tcl           S2        ^ab{1,}$            abb       OK
tcl           S2        ^ab\{1,}$           abb       FAIL extra characters after close-brace
tcl           S2        ^ab\{1,\}$          abb       FAIL abb
tcl           S2        ^ab\\{1,\\}$        abb       FAIL couldn't compile regular expression pattern: invalid repetition count(s)
tcl           S2        ^ab{1,2}$           abb       OK
tcl           S2        ^ab\{1,2}$          abb       FAIL extra characters after close-brace
tcl           S2        ^ab\{1,2\}$         abb       FAIL abb
tcl           S2        ^ab\\{1,2\\}$       abb       FAIL couldn't compile regular expression pattern: invalid repetition count(s)
tcl           ax123     ^a(b)$              ab        OK
tcl           ax123     ^a\(b\)$            ab        FAIL ab
tcl           ax123     ^a\\(b\\)$          ab        FAIL ab
tcl           ax123     ^(x|ab)$            ab        OK
tcl           ax123     ^\(x\|ab\)$         ab        FAIL ab
tcl           ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
tcl           ax5       ^a\_$               a\_       FAIL a\_
tcl           ax5       ^a\\_$              a\_       OK
tcl           ax5       ^a\\\\_$            a\_       FAIL a\_
tcl           ax5       ^a\.b$              a.b       OK
tcl           ax5       ^a\\.b$             a.b       FAIL a.b
tcl           ax5       ^a*b$               a*b       FAIL a*b
tcl           ax5       ^a\*b$              a*b       OK
tcl           ax5       ^a\\*b$             a*b       FAIL a*b
tcl           ax5       ^a[b$               a[b       FAIL
tcl           ax5       ^a\[b$              a[b       FAIL
tcl           ax5       ^a\\[b$             a[b       FAIL
tcl           ax5       ^a]b$               a]b       OK
tcl           ax5       ^a\]b$              a]b       OK
tcl           ax5       ^a\\]b$             a]b       FAIL a]b
tcl           ax5       ^a{b$               a{b       FAIL
tcl           ax5       ^a\{b$              a{b       OK
tcl           ax5       ^a\\{b$             a{b       FAIL
tcl           ax5       ^a}b$               a}b       FAIL extra characters after close-brace
tcl           ax5       ^a\}b$              a}b       OK
tcl           ax5       ^a\\}b$             a}b       FAIL extra characters after close-brace
tcl           ax5       ^a{5}b$             a{5}b     FAIL a{5}b
tcl           ax5       ^a\{5\}b$           a{5}b     OK
tcl           ax5       ^a\\{5\\}b$         a{5}b     FAIL couldn't compile regular expression pattern: invalid repetition count(s)
tcl           ax5       ^a(b$               a(b       FAIL couldn't compile regular expression pattern: parentheses () not balanced
tcl           ax5       ^a\(b$              a(b       OK
tcl           ax5       ^a\\(b$             a(b       FAIL couldn't compile regular expression pattern: parentheses () not balanced
tcl           ax5       ^a)b$               a)b       FAIL couldn't compile regular expression pattern: parentheses () not balanced
tcl           ax5       ^a\)b$              a)b       OK
tcl           ax5       ^a\\)b$             a)b       FAIL couldn't compile regular expression pattern: parentheses () not balanced
tcl           ax5       ^(a|b)$             (a|b)     FAIL (a|b)
tcl           ax5       ^\(a\|b\)$          (a|b)     OK
tcl           ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
tcl           ax5       ^a+b$               a+b       FAIL a+b
tcl           ax5       ^a\+b$              a+b       OK
tcl           ax5       ^a\\+b$             a+b       FAIL a+b
tcl           ax5       ^a?b$               a?b       FAIL a?b
tcl           ax5       ^a\?b$              a?b       OK
tcl           ax5       ^a\\?b$             a?b       FAIL a?b
tcl           ax5       ^a^b$               a^b       FAIL a^b
tcl           ax5       ^a\^b$              a^b       OK
tcl           ax5       ^a\\^b$             a^b       FAIL a^b
tcl           ax5       ^a$b$               a$b       FAIL can't read "b": no such variable
tcl           ax5       ^a\$b$              a$b       FAIL can't read "b": no such variable
tcl           ax5       ^a\\$b$             a$b       FAIL can't read "b": no such variable
tcl           ax6       ^a[\]_$             a\_       FAIL couldn't compile regular expression pattern: brackets [] not balanced
tcl           ax6       ^a[\\]_$            a\_       OK
tcl           ax6       ^a[\\\\]_$          a\_       OK
tcl           ax7       ^a[[:alpha:]]$      ab        OK
tcl           ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
vim version: VIM - Vi IMproved 8.0 (2016 Sep 12)
vim           -         ^a.$                ab        OK
vim           -         ^[a]b$              ab        OK
vim           -         ^[^b]b$             ab        OK
vim           S2        ^abx?$              ab        FAIL ab
vim           S2        ^abx\?$             ab        OK
vim           S2        ^abx\\?$            ab        FAIL ab
vim           S2        ^abx*$              ab        OK
vim           S2        ^abx\*$             ab        FAIL ab
vim           S2        ^abx\\*$            ab        FAIL ab
vim           S2        ^ab+$               abb       FAIL abb
vim           S2        ^ab\+$              abb       OK
vim           S2        ^ab\\+$             abb       FAIL abb
vim           S2        ^ab{1}$             ab        FAIL ab
vim           S2        ^ab\{1}$            ab        OK
vim           S2        ^ab\{1\}$           ab        OK
vim           S2        ^ab\\{1\\}$         ab        FAIL ab
vim           S2        ^ab{1,}$            abb       FAIL abb
vim           S2        ^ab\{1,}$           abb       OK
vim           S2        ^ab\{1,\}$          abb       OK
vim           S2        ^ab\\{1,\\}$        abb       FAIL abb
vim           S2        ^ab{1,2}$           abb       FAIL abb
vim           S2        ^ab\{1,2}$          abb       OK
vim           S2        ^ab\{1,2\}$         abb       OK
vim           S2        ^ab\\{1,2\\}$       abb       FAIL abb
vim           ax123     ^a(b)$              ab        FAIL ab
vim           ax123     ^a\(b\)$            ab        OK
vim           ax123     ^a\\(b\\)$          ab        FAIL ab
vim           ax123     ^(x|ab)$            ab        FAIL ab
vim           ax123     ^\(x\|ab\)$         ab        OK
vim           ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
vim           ax5       ^a\_$               a\_       FAIL a\_
vim           ax5       ^a\\_$              a\_       OK
vim           ax5       ^a\\\\_$            a\_       FAIL a\_
vim           ax5       ^a\.b$              a.b       OK
vim           ax5       ^a\\.b$             a.b       FAIL a.b
vim           ax5       ^a*b$               a*b       FAIL a*b
vim           ax5       ^a\*b$              a*b       OK
vim           ax5       ^a\\*b$             a*b       FAIL a*b
vim           ax5       ^a[b$               a[b       FAIL a[b
vim           ax5       ^a\[b$              a[b       OK
vim           ax5       ^a\\[b$             a[b       FAIL a[b
vim           ax5       ^a]b$               a]b       OK
vim           ax5       ^a\]b$              a]b       OK
vim           ax5       ^a\\]b$             a]b       FAIL a]b
vim           ax5       ^a{b$               a{b       OK
vim           ax5       ^a\{b$              a{b       FAIL a{b
vim           ax5       ^a\\{b$             a{b       FAIL a{b
vim           ax5       ^a}b$               a}b       OK
vim           ax5       ^a\}b$              a}b       OK
vim           ax5       ^a\\}b$             a}b       FAIL a}b
vim           ax5       ^a{5}b$             a{5}b     OK
vim           ax5       ^a\{5\}b$           a{5}b     FAIL a{5}b
vim           ax5       ^a\\{5\\}b$         a{5}b     FAIL a{5}b
vim           ax5       ^a(b$               a(b       OK
vim           ax5       ^a\(b$              a(b       FAIL a(b
vim           ax5       ^a\\(b$             a(b       FAIL a(b
vim           ax5       ^a)b$               a)b       OK
vim           ax5       ^a\)b$              a)b       FAIL a)b
vim           ax5       ^a\\)b$             a)b       FAIL a)b
vim           ax5       ^(a|b)$             (a|b)     OK
vim           ax5       ^\(a\|b\)$          (a|b)     FAIL (a|b)
vim           ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
vim           ax5       ^a+b$               a+b       OK
vim           ax5       ^a\+b$              a+b       FAIL a+b
vim           ax5       ^a\\+b$             a+b       FAIL a+b
vim           ax5       ^a?b$               a?b       OK
vim           ax5       ^a\?b$              a?b       FAIL a?b
vim           ax5       ^a\\?b$             a?b       FAIL a?b
vim           ax5       ^a^b$               a^b       OK
vim           ax5       ^a\^b$              a^b       OK
vim           ax5       ^a\\^b$             a^b       FAIL a^b
vim           ax5       ^a$b$               a$b       OK
vim           ax5       ^a\$b$              a$b       OK
vim           ax5       ^a\\$b$             a$b       FAIL a$b
vim           ax6       ^a[\]_$             a\_       FAIL a\_
vim           ax6       ^a[\\]_$            a\_       OK
vim           ax6       ^a[\\\\]_$          a\_       OK
vim           ax7       ^a[[:alpha:]]$      ab        OK
vim           ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
vi version: nvi 1.81.6-13
vi            -         ^a.$                ab        OK
vi            -         ^[a]b$              ab        OK
vi            -         ^[^b]b$             ab        OK
vi            S2        ^abx?$              ab        FAIL script, 2: No match found
vi            S2        ^abx\?$             ab        FAIL script, 2: No match found
vi            S2        ^abx\\?$            ab        FAIL script, 2: No match found
vi            S2        ^abx*$              ab        OK
vi            S2        ^abx\*$             ab        FAIL script, 2: No match found
vi            S2        ^abx\\*$            ab        FAIL script, 2: No match found
vi            S2        ^ab+$               abb       FAIL script, 2: No match found
vi            S2        ^ab\+$              abb       FAIL script, 2: No match found
vi            S2        ^ab\\+$             abb       FAIL script, 2: No match found
vi            S2        ^ab{1}$             ab        FAIL script, 2: No match found
vi            S2        ^ab\{1}$            ab        FAIL script, 2: RE error: braces not balanced
vi            S2        ^ab\{1\}$           ab        OK
vi            S2        ^ab\\{1\\}$         ab        FAIL script, 2: No match found
vi            S2        ^ab{1,}$            abb       FAIL script, 2: No match found
vi            S2        ^ab\{1,}$           abb       FAIL script, 2: RE error: braces not balanced
vi            S2        ^ab\{1,\}$          abb       OK
vi            S2        ^ab\\{1,\\}$        abb       FAIL script, 2: No match found
vi            S2        ^ab{1,2}$           abb       FAIL script, 2: No match found
vi            S2        ^ab\{1,2}$          abb       FAIL script, 2: RE error: braces not balanced
vi            S2        ^ab\{1,2\}$         abb       OK
vi            S2        ^ab\\{1,2\\}$       abb       FAIL script, 2: No match found
vi            ax123     ^a(b)$              ab        FAIL script, 2: No match found
vi            ax123     ^a\(b\)$            ab        OK
vi            ax123     ^a\\(b\\)$          ab        FAIL script, 2: No match found
vi            ax123     ^(x|ab)$            ab        FAIL script, 2: No match found
vi            ax123     ^\(x\|ab\)$         ab        FAIL script, 2: No match found
vi            ax123     ^\\(x\\|ab\\)$      ab        FAIL script, 2: No match found
vi            ax5       ^a\_$               a\_       FAIL script, 2: No match found
vi            ax5       ^a\\_$              a\_       OK
vi            ax5       ^a\\\\_$            a\_       FAIL script, 2: No match found
vi            ax5       ^a\.b$              a.b       OK
vi            ax5       ^a\\.b$             a.b       FAIL script, 2: No match found
vi            ax5       ^a*b$               a*b       FAIL script, 2: No match found
vi            ax5       ^a\*b$              a*b       OK
vi            ax5       ^a\\*b$             a*b       FAIL script, 2: No match found
vi            ax5       ^a[b$               a[b       FAIL script, 2: RE error: brackets ([ ]) not balanced
vi            ax5       ^a\[b$              a[b       OK
vi            ax5       ^a\\[b$             a[b       FAIL script, 2: RE error: brackets ([ ]) not balanced
vi            ax5       ^a]b$               a]b       OK
vi            ax5       ^a\]b$              a]b       OK
vi            ax5       ^a\\]b$             a]b       FAIL script, 2: No match found
vi            ax5       ^a{b$               a{b       OK
vi            ax5       ^a\{b$              a{b       FAIL script, 2: RE error: invalid repetition count(s)
vi            ax5       ^a\\{b$             a{b       FAIL script, 2: No match found
vi            ax5       ^a}b$               a}b       OK
vi            ax5       ^a\}b$              a}b       FAIL script, 2: RE error: parentheses not balanced
vi            ax5       ^a\\}b$             a}b       FAIL script, 2: No match found
vi            ax5       ^a{5}b$             a{5}b     OK
vi            ax5       ^a\{5\}b$           a{5}b     FAIL script, 2: No match found
vi            ax5       ^a\\{5\\}b$         a{5}b     FAIL script, 2: No match found
vi            ax5       ^a(b$               a(b       OK
vi            ax5       ^a\(b$              a(b       FAIL script, 2: RE error: parentheses not balanced
vi            ax5       ^a\\(b$             a(b       FAIL script, 2: No match found
vi            ax5       ^a)b$               a)b       OK
vi            ax5       ^a\)b$              a)b       FAIL script, 2: RE error: parentheses not balanced
vi            ax5       ^a\\)b$             a)b       FAIL script, 2: No match found
vi            ax5       ^(a|b)$             (a|b)     OK
vi            ax5       ^\(a\|b\)$          (a|b)     FAIL script, 2: No match found
vi            ax5       ^\\(a\\|b\\)$       (a|b)     FAIL script, 2: No match found
vi            ax5       ^a+b$               a+b       OK
vi            ax5       ^a\+b$              a+b       OK
vi            ax5       ^a\\+b$             a+b       FAIL script, 2: No match found
vi            ax5       ^a?b$               a?b       OK
vi            ax5       ^a\?b$              a?b       OK
vi            ax5       ^a\\?b$             a?b       FAIL script, 2: No match found
vi            ax5       ^a^b$               a^b       OK
vi            ax5       ^a\^b$              a^b       OK
vi            ax5       ^a\\^b$             a^b       FAIL script, 2: No match found
vi            ax5       ^a$b$               a$b       OK
vi            ax5       ^a\$b$              a$b       OK
vi            ax5       ^a\\$b$             a$b       FAIL script, 2: No match found
vi            ax6       ^a[\]_$             a\_       OK
vi            ax6       ^a[\\]_$            a\_       OK
vi            ax6       ^a[\\\\]_$          a\_       OK
vi            ax7       ^a[[:alpha:]]$      ab        OK
vi            ax8       ^a[\t]b$            a<tab>b   FAIL script, 2: No match found
----------------------------------------------------------
