- or download this
my $s='Tue Feb 8 11:11:11 2005: blah blah blah';
my $regex=qr(^$wday $mon\s+$mday \d{2}:\d{2}:\d{2} $year:);
...
print "found\n" if $line=~/$regex/;
}
- or download this
# interpolate the variables (you have to define your
# variables to interpolate first so they work).
my $regex="^$wday $mon\s+$mday \d{2}:\d{2}:\d{2} $year:";
$regex=qr($regex); # compile the regular expression
- or download this
my $s='Tue Feb 8 11:11:11 2005: blah blah blah';
my $regex=createRegEx('Tue','Feb','8','2005');
...
return(qr($regex));
}