[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unquoted special characters in regexps
From: |
martin rudalics |
Subject: |
Re: Unquoted special characters in regexps |
Date: |
Fri, 03 Mar 2006 19:52:39 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> 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
> What is the point you are trying to make? That
>
> "[^\\]\\(\\(\\\\\\\\\\)*\\)\"[ \t,]*"
>
> would be easier to read? Not for me.
I agree that writing and reading 10 backslashes in a row is dreadful.
However, writing `[\\]' to match a single backslash is dreadful as well.
A character alternative without alternative does not deserve its name.
Nowadays I'd probably write something like
"[^\\]\\(\\\\\\{2\\}*\\)\"[ \t,]*"
but maybe at the time the original expression was written repetition
operators were not yet available.
Anyway, the "point I was trying to make" was a different one. I believe
we should give suggestions how to avoid writing confusing regexps rather
than change `regexp-quote'.
- 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 <=
- 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, 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