I would think this was really simple. I am trying to match closing delimiters in Emacs Lisp regex. I can match {}()[
no problem, but I cannot match ]
. I have been using re-builder and have tried "[\\}\\)\\]]"
, "[\\}\\)]]"
, "[\\}\\)\\\]]"
, "[\\}\\)\\\\]]"
and it still won't match the closing square bracket. The brace and the parenthesis match just fine. What am I doing wrong?
-
Somehow related: Emacs Lisp: regular expression for “anything except close square bracket”?– JuanchoDec 2, 2016 at 23:40
1 Answer
Put the ]
as the first character after the [
which starts the character class, e.g.
[])}]