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

Re: [PATCH] git send-email: edit recipient addresses with the --compose flag

From
IHIan Hilt <ian.hilt@gmx.com>
Date
Nov 10, 2008, 18:12 UTC
Message-ID
<alpine.LFD.2.00.0811101303090.30187@maintenance05.msc.mcgregor-surmount.com>
In-Reply-To
<7vbpwo88gh.fsf@gitster.siamese.dyndns.org>
On Mon, 10 Nov 2008, Junio C Hamano wrote:
Show 30 quoted lines
> Ian Hilt <ian.hilt@gmx.com> writes:
> 
> > On Sun, 9 Nov 2008, Junio C Hamano wrote:
> >> Ian Hilt <ian.hilt@gmx.com> writes:
> >> 
> >> > On Sun, 9 Nov 2008, Francis Galiegue wrote:
> >> >> Le Sunday 09 November 2008 13:59:48 Ian Hilt, vous avez écrit :
> >> >> > +	if ($c_file =~ /^To:\s*+(.+)\s*\nCc:/ism) {
> >> >> 
> >> >> Greedy operators are only supported with perl 5.10 or more... I think it's a 
> >> >> bad idea to use them...
> >> ...
> >> You expect something non-blank there anyway, so why not do:
> >> 
> >> 	To:\s*(\S.*?)\s*\n....
> >
> > That works.  Although, I seem to be missing Francis' point.  According
> > to perlre, a quantified subpattern is "greedy".  So a "greedy operator"
> > is any one of the standard quantified subpatterns.  The "+" and "?"
> > modify its matching behavior.  And it seems to me that it _has_ to use a
> > q.s. to work ...
> 
> The "perlre" documentation you are reading is from Perl 5.10.0; check
> "perldelta" documentation next to it.
> 
> I think you are wrong in saying that "it _has_ to use".  Yes, you _can_
> use possessive quantifiers to write that pattern (provided if you can
> limit your users to Perl 5.10.0 or later), but you do _not_ have to (and I
> just showed you how).  By not using the new feature, you can make it work
> for people with older version of Perl.

Right. I was saying it has to use quantifiers, in general, not that it has to use possessive quantifiers.

Previous: Junio C HamanoNext: Francis Galiegue
Message 7 of 17 in “git send-email: edit recipient addresses with the --compose flag”
  1. git send-email: edit recipient addresses with the --compose flagIan Hilt, Nov 9, 2008
  2. Francis GaliegueNov 9, 2008
  3. Ian HiltNov 9, 2008
  4. Junio C HamanoNov 9, 2008
  5. Ian HiltNov 10, 2008
  6. Junio C HamanoNov 10, 2008
  7. Ian HiltNov 10, 2008
  8. Francis GaliegueNov 10, 2008
  9. Aristotle PagaltzisNov 10, 2008
  10. TaitNov 11, 2008
  11. Francis GaliegueNov 11, 2008
  12. Ian HiltNov 11, 2008
  13. Ian HiltNov 11, 2008
  14. Francis GaliegueNov 11, 2008
  15. TaitNov 11, 2008
  16. Francis GaliegueNov 10, 2008
  17. Francis GaliegueNov 10, 2008

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.