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?
Asked
Active
Viewed 1,888 times
3

Drew
- 75,699
- 9
- 109
- 225

Prgrm.celeritas
- 849
- 6
- 15
-
Somehow related: [Emacs Lisp: regular expression for “anything except close square bracket”?](http://stackoverflow.com/a/15120909/605276) – Juancho Dec 02 '16 at 23:40
1 Answers
7
Put the ]
as the first character after the [
which starts the character class, e.g.
[])}]

icarus
- 1,904
- 1
- 10
- 15