public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: "Andrew J. Gray" <andrewg@gnu.org>
To: Lars.Henriksen@netman.dk
Cc: hatzis@juniper.net
Cc: help-gnats@gnu.org
Cc: yngve.svendsen@sun.com
Cc: pdm@zamazal.org
Subject: Re: Subject header matching--once again
Date: Sun, 02 Mar 2003 11:57:00 -0000	[thread overview]
Message-ID: <200303021053.h22Arrn11407@localhost.localdomain> (raw)
In-Reply-To: <20021201221905.GA1331680@cluster2.netman.dk> (message from Lars Henriksen on Sun, 1 Dec 2002 23:19:05 +0100)

> In the meantime the existing Subject match code should be fixed to reflect
> the agreement reached a year back, see my first mail in this thread:
> http://mail.gnu.org/pipermail/help-gnats/2002-November/003185.html
> 
> A patch follows that includes an update to the documentation. The feature
> is mentioned a couple of times in passing in 'Keeping Track'. I think it
> deserves a (sub)section of its own and have inserted one called 'Following up
> via direct email' in the 'Editing existing Problem Reports' section of 'The
> GNATS User Tools' chapter. I have also corrected a couple of minor errors
> that I ran across.

Thanks for that patch, I am sorry it has taken me so long to get to
it.

> The regular expression used for matching the Subject line appears in the code
> as
> 
>      \\<(PR[ \t#/]?|([-A-Za-z0-9_+.]+)/)([0-9]+)
> 
> whereas the documentation has
> 
>      \<(PR[ \t#/]?|[-\w+.]+/)[0-9]+
> 
> I couldn't get the GNU match-word-constituent operator (\w) to work inside
> the bracket expression and am uncertain as to whether it is allowed there.
> Perl has it. The parentheses which are in the code, but missing from the
> manual, do not affect the matching; they are there only to capture Category
> and Number.

As I understand it the match-word-constituent operator (\w) is not
meant to work inside matching lists. I am looking at the "info"
documentation included with the regex 0.12 (available from
http://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz). In the "List
Operators" node it says most characters lose any special meaning
inside a list.

I think the closest equivalent that works in a list is the alnum
character class. Using this the regular expression would become:

    \\<(PR[ \t#/]?|([-[:alnum:]_+.]+)/)([0-9]+)

Do you think this is a satisfactory replacement for \w?

> I haven't aligned the regular expression syntax with the rest of GNATS as
> suggested by Milan. This is a non-issue as long as the regular expression
> is hard-coded and not exposed for users to modify. The regex searching is also
> case sensitive now.

OK.

> The patch is in production use in the GNATS installation that I am
> responsible for. I hope it can make it into GNATS 4.0-beta2?

Sorry that the patch missed the beta 2. Once we have decided whether
or not to use the alnum character class I will commit the patch.

-- 
Andrew J. Gray


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

  parent reply	other threads:[~2003-03-02 11:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03 21:40 Lars Henriksen
2002-11-04 11:31 ` Mel Hatzis
2002-11-04 15:41   ` Lars Henriksen
2002-11-06 21:43     ` Lars Henriksen
2002-11-09  3:26     ` Mel Hatzis
2002-12-02 14:45       ` Lars Henriksen
2002-12-17  6:38         ` Yngve Svendsen
2003-03-02 11:57         ` Andrew J. Gray [this message]
2003-03-02 20:47           ` Mark D. Baushke
2003-03-03 20:22             ` Lars Henriksen
2003-03-03 19:51           ` Lars Henriksen
2003-03-09  2:33             ` Andrew J. Gray

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=200303021053.h22Arrn11407@localhost.localdomain \
    --to=andrewg@gnu.org \
    --cc=Lars.Henriksen@netman.dk \
    --cc=hatzis@juniper.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).