[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: |
Fri, 3 Mar 2006 07:51:47 -0600 (CST) |
Martin Rudalics wrote:
But you should
occasionally think of less experienced programmers who try to guess the
motivations for writing an expression like
(string-match "[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*"
definition start)
in `mailalias.el'. It's got no less than three backslashes preceding
non-escaped right brackets. Can you tell me what the author wants to
match?
Unless it really is too early in the morning for me, something that
starts with something that is not a backslash, then an even number of
backslashes, then a ", then a sequence of non-newline whitespace or
commas. The one pair of \\(...\\) that is not needed for this meaning
is probably meant for use with match-data.
What is the point you are trying to make? That
"[^\\]\\(\\(\\\\\\\\\\)*\\)\"[ \t,]*"
would be easier to read? Not for me.
Sincerely,
Luc.
- Re: Unquoted special characters in regexps, (continued)
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/02
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/02
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/03
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/03
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/03
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/03
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/03
- Re: Unquoted special characters in regexps,
Luc Teirlinck <=
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/04
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/03
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/04
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/04
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/05
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/04
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/04
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/03
- Re: Unquoted special characters in regexps, martin rudalics, 2006/03/04
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/04