git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git send-email --notmuch expr

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 25, 2009, 10:16 UTC
Message-ID
<m3hbsic3l5.fsf@localhost.localdomain>
In-Reply-To
<87d4375ne0.fsf@59A2.org>
Jed Brown <jed@59A2.org> writes:
Show 7 quoted lines
> 	} 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
Previous: Jed BrownNext: Jed Brown
Message 4 of 5 in “git send-email --notmuch expr”
  1. Jed BrownNov 25, 2009
  2. 1/2 Added the --notmuch option to git format-patch.Jed Brown, Nov 25, 2009
  3. 2/2 Documentation for format-patch --notmuch.Jed Brown, Nov 25, 2009
  4. Jakub NarebskiNov 25, 2009
  5. Jed BrownNov 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.