Gossamer Forum
Home : General : Perl Programming :

Date Range use in a regular expression?

Quote Reply
Date Range use in a regular expression?
Hi, I'm (actually my wife is) trying to parse a log file. Each line in the log file starts with a date and time i.e. "
Jan 01 12:13:00:121213 2002 This is a line in the text file". We'd like to parse the text file by a date range that is determined by an <STDIN> $startdate and $enddate .



I was wondering if there is a way to apply a date format in a regular expression that says if the date on the line, is between $startdate and $enddate {



Any ideas. I was thinking of using pdate module, but not really sure if this can be applied to our scenerio. Also we don't see much info on pdate module.



Any suggestions out thereAngelic
Quote Reply
Re: [nickswave] Date Range use in a regular expression? In reply to
What is the :121213 bit?

Last edited by:

Paul: Oct 8, 2002, 3:05 AM