dist-git help wanted: write me a regex!

James Cassell fedoraproject at cyberpear.com
Mon Dec 21 05:25:06 UTC 2009


On Mon, 21 Dec 2009 00:01:06 -0500, Jesse Keating <jkeating at redhat.com>  
wrote:

> The kernel module is full of changelogs that start with:
>
> Thu Dec 17 2009 Jarod Wilson <jarod at redhat.com> 2.6.32.1-11
>
> of course the date, name, email and revision will change, but the format
> is the same.  This data is not really necessary in git, as we have all
> of that already, and it makes shortlog rather useless.
>
> parsecvs has a feature that allows one to filter out parts of log
> messages, and it requires a perl regex to find the lines to strip out.
> I'm no regex hacker, but I bet some of you are.  Can somebody please
> write me a regex that will catch the above line, and others like it?
> Thanks!
>

This should do it:
/((Mon|Tues?|Wed|Thu(rs?)?|Fri|Sat|Sun)\s+(Jan|Feb|Mar|Apr|May|June?|July?|Aug|Sep|Oct|Nov|Dec)\s+[0-3]?[0-9]\s+(19|20)[0-9][0-9]\s+[A-Za-z0-9\s]+<[^\s@]+@[^\s@>]+>\s+2.[4-6].[0-9.-]+\s*)/


-- 
James Cassell




More information about the fedora-devel-list mailing list