> EFFECTIVE DATE: 07/12/01 DAILY CUSTOMER ACCOUNT REPORT
> RUN DATE: 07/13/01
> DATE: nn/nn/nn
> DATE nn/nn/nn
> DATE : nn/nn/nn
> DATE: nn/nn/nnnn
>
> $look =~ /^\s*DATE\s?\W?\s+(\d{2}\/\d{2}\/\d{2,4})/;
First off, if you have literal slashes to match change your match
delimiter!!! You won't have to escape the slashes then.
$look =~ m! .... !
> What I expect in $1 is 07/12/01
this should work, tho i haven't tried it:
$look =~ m!DATE[ :]+(\d{2}/\d{2}\d{2,4})!;
Match DATE, match 1 or more spaces or colons, then match the date part and
remember it. If you want to get both dates use the g modifier and assign
the match to a list:
my ($date1, $date2) = (look =~ m!\d{2}/\d{2}/\d{2,4}!g);
Luke
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]