Git development
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jed Brown <jed@59A2.org>
Cc: git@vger.kernel.org, Pierre Habouzit <madcoder@debian.org>
Subject: Re: git send-email --notmuch expr
Date: Wed, 25 Nov 2009 02:16:52 -0800 (PST)	[thread overview]
Message-ID: <m3hbsic3l5.fsf@localhost.localdomain> (raw)
In-Reply-To: <87d4375ne0.fsf@59A2.org>

Jed Brown <jed@59A2.org> writes:

> 	} elsif (/^(?:To|Cc|Bcc):/i) {
> 		print "To/Cc/Bcc fields are not interpreted yet, they have been ignored\n";
> 		next;
> 	}
> 
> This regex doesn't match these headers (is the leading ?: a typo?) so
> there is no warning.

(?: ... ) is in Perl non-capturing grouping

>From perlre(1)

  "(?:pattern)"
  "(?imsx-imsx:pattern)"
       This is for clustering, not capturing; it groups subexpressions
       like "()", but doesn't make backreferences as "()" does.

So it is not a bug, and it definitely should match... unless implicit
variable $_ (the default input and pattern-searching space) got
mangled.  It would be better to use explicit form:

   $variable =~ /pattern/

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2009-11-25 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  2:49 git send-email --notmuch expr Jed Brown
2009-11-25  2:50 ` [PATCH 1/2] Added the --notmuch option to git format-patch Jed Brown
2009-11-25  2:50   ` [PATCH 2/2] Documentation for format-patch --notmuch Jed Brown
2009-11-25 10:16 ` Jakub Narebski [this message]
2009-11-25 13:06   ` git send-email --notmuch expr Jed Brown

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=m3hbsic3l5.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jed@59A2.org \
    --cc=madcoder@debian.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox