[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scan of regexp mistakes
From: |
Mattias Engdegård |
Subject: |
Re: Scan of regexp mistakes |
Date: |
Sat, 9 Mar 2019 21:16:09 +0100 |
9 mars 2019 kl. 18.12 skrev Paul Eggert <address@hidden>:
>
> Mattias Engdegård wrote:
>> - ("^[0-9-]+ +\\|^ \\{11,\\}\\|^\t
>> \\{3,\\}\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-z][a-z][a-z]
>> [0-9:+ ]+"
>> + ("^[0-9-]+ +\\|^ \\{11,\\}\\|^\t
>> \\{3,\\}\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-Z][a-z][a-z]
>> [0-9:+ ]+"
>> The [A-z] should become [A-Za-z] rather than [A-Z], right?
>
> From context I think not. It's trying to match a particular English-language
> date format where month-name abbreviations are always capitalized. The author
> was too lazy to list the twelve abbreviations.
You are right, and a smaller regexp (in the size of the matched language) is
preferable -- especially as the preceding comment is worried about accidental
matches. Thanks!