in reply to Re^2: Gettin certain lines of text from a text file!
in thread Gettin certain lines of text from a text file!
So, when you're looking for the date range, you can find the "Analysis Date Range", but then how do you decide what is the date coming after that?
I would say that you're looking for:
# i modifer to make it case insensitive, just in case. if ($line =~ /Analysis Date Range\s*:\s*([0-9]+)\/([0-9]+)\/([0-9])+/i +) { print "I found an Analysis date with month/day $1, $2 in year $3\n"; }else{ print "This line did not have an analysis date that I recognize in i +t\n"; }
Another way to go, would be to grab larger chunks and then split them later:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Gettin certain lines of text from a text file!
by Foxyirish1987 (Novice) on Sep 15, 2009 at 14:30 UTC |