From: "Mattias Engdegård" <mattiase@acm.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Scan of regexp mistakes
Date: Sat, 9 Mar 2019 21:16:09 +0100 [thread overview]
Message-ID: <E4A978A8-CD40-4221-A853-76504DAF2EDC@acm.org> (raw)
In-Reply-To: <439bdf06-982a-62c5-2338-3560462c959f@cs.ucla.edu>
9 mars 2019 kl. 18.12 skrev Paul Eggert <eggert@cs.ucla.edu>:
>
> 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!
next prev parent reply other threads:[~2019-03-09 20:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-03 18:01 Scan of regexp mistakes Mattias Engdegård
2019-03-05 2:04 ` Paul Eggert
2019-03-05 4:30 ` Clément Pit-Claudel
2019-03-05 15:06 ` Mattias Engdegård
2019-03-08 6:02 ` Stefan Monnier
2019-03-08 17:13 ` Paul Eggert
[not found] ` <1c44342f-01ab-1bc6-4b5c-3485a6f01fda@lanl.gov>
[not found] ` <61035fed-564a-8766-8982-0d05acea341c@cs.ucla.edu>
2019-03-08 20:46 ` bug#34789: " Davis Herring
2019-03-11 14:20 ` Eli Zaretskii
2019-03-09 12:36 ` Mattias Engdegård
2019-03-09 17:14 ` Paul Eggert
2019-03-09 13:09 ` Mattias Engdegård
2019-03-09 17:12 ` Paul Eggert
2019-03-09 20:16 ` Mattias Engdegård [this message]
[not found] <20190305112504.D97DD1EC@emma.svaha.wsnyder.org>
2019-03-05 15:35 ` Wilson Snyder
2019-03-05 16:12 ` Mattias Engdegård
2019-03-07 17:39 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E4A978A8-CD40-4221-A853-76504DAF2EDC@acm.org \
--to=mattiase@acm.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.