emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How do I get a ] into a reg exp?


From: Drew Adams
Subject: RE: How do I get a ] into a reg exp?
Date: Wed, 13 Sep 2006 14:35:34 -0700

    >      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.)

    Thanks. That was a surprise.

It's pretty standard, actually:
http://www.greenend.org.uk/rjk/2002/06/regexp.html.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]