[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with recent change to grep-regexp-alist
From: |
David Kastrup |
Subject: |
Re: problem with recent change to grep-regexp-alist |
Date: |
Sat, 06 Aug 2005 21:20:46 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
>> In the 1.42 revision of grep.el the subpattern for the filename in the
>> regexps of the first two grep-regexp-alist's elements has been changed
>> from "\(.+?\)" to "\([^:\n]+\)". Now the matching fails if the
>> filename contains a colon, while the previous value worked, thanks to the
>> non greedy "+?" quantifier. Note that the regexp of the third
>> grep-regexp-alist's element is still correct, and is the one that
>> matches if grep-highlight-matches's value is "t" (which is the
>> default).
>
> Ok, let's use "\(.+?\)".
>
> You can still get wrong matches with the file names like "abc:123",
> but perhaps such file names are rare.
Maybe \([A-Za-z]:\| ...
or something? It is not like there are many Unix file names starting
with a single letter followed by colon.
But Linux has file names like
/proc/driver/uhci/0000:00:07.2
which might not be terribly relevant, but better safe than sorry...
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Re: problem with recent change to grep-regexp-alist, Stefan Monnier, 2005/08/09