On Mon, Dec 21, 2009 at 12:25 AM, James Cassell
<fedoraproject(a)cyberpear.com> wrote:
On Mon, 21 Dec 2009 00:01:06 -0500, Jesse Keating
<jkeating(a)redhat.com>
wrote:
> The kernel module is full of changelogs that start with:
>
> Thu Dec 17 2009 Jarod Wilson <jarod(a)redhat.com> 2.6.32.1-11
...
> Can somebody please
> write me a regex that will catch the above line, and others like it?
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(a)>]+>\s+2.[4-6].[0-9.-]+\s*)/
"The grammar described in RFC 822 is surprisingly complex."
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
:-)
--
Garry Williams +1 678 656-4579