[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unquoted special characters in regexps
From: |
Luc Teirlinck |
Subject: |
Re: Unquoted special characters in regexps |
Date: |
Mon, 27 Feb 2006 18:44:17 -0600 (CST) |
Richard Stallman wrote:
However, that doesn't necessarily mean the manual is wrong.
There is more than one way to understand the word "special".
At the most literal level, ] is not special; if you write it
without \\, the regexp compiler won't misunderstand it.
However, it does play a special role in the syntax of regexps,
and it is not necessarily a bad thing for users to think of it
as a special character.
It is good for users to think of `]' and `-' as characters that are
special _inside_ the context of a character alternative. That way
they will not be confused by quotes from the Elisp manual like:
Note that the usual regexp special characters are not special
inside a character alternative. A completely different set of
characters is special inside character alternatives: `]', `-' and
`^'.
The special meaning of `]' inside a character alternative is obviously
to close that alternative. But the Elisp manual currently lists `]',
like `^', but unlike `-' among the characters that also have another
special meaning outside that context. That is true for `^', but which
other special meaning does `]' have?
Sincerely,
Luc.
- Re: Unquoted special characters in regexps, (continued)
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/01
- Re: Unquoted special characters in regexps, Andreas Schwab, 2006/03/02
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/02
- Re: Unquoted special characters in regexps, Andreas Schwab, 2006/03/01
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/02
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/04
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/02
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/06
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/07
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/07
- Re: Unquoted special characters in regexps,
Luc Teirlinck <=
- Re: Unquoted special characters in regexps, Thien-Thi Nguyen, 2006/03/04
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/04
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/05
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/05
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/06
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/05
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/05
- Re: Unquoted special characters in regexps, Andreas Schwab, 2006/03/05
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/06
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/05