Hi All,
I try to search the string which has the date format inside
the file,
But i am not able to get the desired files. Pls help me on this..
C)/tmp/sms/perl$ cat a1
115-06-1979
10-11-81
20-NOV-2008
05-07-1981
welcome
15-10-2008
12-03-20009
(C)/tmp/sms/perl$ cat 1
#/usr/bin/perl
open(DATA,"a1")||die"Unable to open the file";
while(<DATA>)
{
if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/)
{
print $_;
}
}
close(DATA);
exit 0;
(C)/tmp/sms/perl$
Output should be :
10-11-81
20-NOV-2008
05-07-1981
15-10-2008
