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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ian Hilt <ian.hilt@...>
Cc: Junio C Hamano <gitster@...>, Git Mailing List <git@...>, Pierre Habouzit <madcoder@...>
Date: Monday, November 10, 2008 - 3:49 am

Le Monday 10 November 2008 01:38:30 Ian Hilt, vous avez écrit :

No. The _lazy_ quantifiers (*?, ??, *?, +?, {...}?) are supported all right. 
But they should be avoided in general.


My wording may be bad, then. They're not greedy, they just don't allow for 
backtracking. They are more than greedy. Let me explain.

Consider "number 42" for instance. If you match it against:

* .*(\d+) => $1 would be "2": the * eats everything but _has_ to backtrack for 
\d+ to get anything, but just one number is enough;
* .*?(\d+) => $1 would be "42": as *? is lazy, this means that after each 
match, it looks to see whether the next element in the regex would match 
anything; as soon as \d+ matches 4, .*? stops there;
* .*+(\d+) => $1 would match nothing! *+ eats everything, but the + afterwards 
_doesn't allow it to backtrack_.

I hope this makes things a little clearer ;) I think the correct term for *+, 
++, ?+ etc is "possessive" quantifiers, I'm just not sure.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] git send-email: edit recipient addresses with th..., Francis Galiegue, (Mon Nov 10, 3:49 am)
Re: [PATCH] git send-email: edit recipient addresses with th..., Aristotle Pagaltzis, (Mon Nov 10, 4:08 am)