On Sun, May 19, 2013 at 10:05 AM, Felipe Contreras
<[email protected]> wrote:
> On Sun, May 19, 2013 at 9:40 AM, Ramkumar Ramachandra
> <[email protected]> wrote:
>>> + '-L', '%u,+%u' % [start, len],
>>> + '--since', $since, from + '^',
>>> + '--', source]) do |p|
>>> + p.each do |line|
>>> + if line =~ /^(\h{40})/
>>> + id = $1
>>
>> Use $0 and remove the parens: you're matching the whole line.
>
> No, I'm not matching the whole line, but you are right; there's no
> need for groups.
Actually $&.
--
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html