[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 16:41:15 -0600 (CST) |
Martin Rudalics wrote:
> To give a less technical answer than in my previous response, an
> _unquoted_ ", followed by a bunch non-newline whitespace or commas.
(string-match "[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*" "\" ,") => nil
Less technical means more potential for ambiguity. Of course the
regexp does _not_ match "\" ,", because that would not guarantee that
the " it found is unquoted. Apparently, point is at the beginning of
a string and the regexp searches for the ending unquoted " by
searching, as I said in my previous message, for something that is
_not_ a backslash, then an even number of backslashes, then a ", then
a bunch of non-newline whitespace or commas. Apparently, the code
relies on the assumption that the string does not consist of _only_
backslashes.
ELISP> (string-match "[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*" "012\" ,")
2
Sincerely,
Luc.
- Re: Unquoted special characters in regexps, (continued)
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/04
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/01
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/02
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/02
- Re: Unquoted special characters in regexps, Richard Stallman, 2006/03/02
- 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 <=
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/03
- Re: Unquoted special characters in regexps, Luc Teirlinck, 2006/03/04
- 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