On Mon, 25 Nov 2013 12:55:35 -0600, Mike Blezien wrote:
>Hello,
>
>Regular expression have never been my strong suite so hoping to get
>a litte help with a line in file I need to extract a portion of it.
>
>The text I need to extract from this line is "November 21, 2013"
>from this line in the file, just the date:
>
>Posted by <a href="mailto:someem...@email.com";>Some Name</a> on
>November 21, 2013 at 23:21:58:<p>
>
>what would be the regrex to use to extract the date from the line ?
>
>Thanks,
>
>Mike(mickalo)Blezien
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Thunder Rain Internet Publishing
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

My attempt:

#! /usr/bin/perl -w
use 5.14.0;
use strict;
while( <> ) {
        if ( /(?:.*?)(\w+ \d+, \d+) at .*<p>$/ ) {
                print "$1\n";
        }
}
--
Peter Gordon, pete...@netspace.net.au on 11/26/2013



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to