Lennart Borgman <address@hidden> writes:
How do I write
(re-search-forward "[a-z\]]")
I mean how do I get the ] into the characters to search for? It works
if I remove a-z. Looks like a bug to me.
\] is the same as ] in string syntax. Anyway:
(info "(emacs) Regexps")
To include a `]' in a character set, you must make it the first
character. For example, `[]a]' matches `]' or `a'. To include a
`-', write `-' as the first or last character of the set, or put
it after a range. Thus, `[]-]' matches both `]' and `-'.
To include `^' in a set, put it anywhere but at the beginning of
the set. (At the beginning, it complements the set--see below.)