On 11-05-25 10:39 AM, Irfan Sayed wrote:
hi,
i have string like this
"2011/05/25 07:24:58 -0700 PDT" i need to match "2011/05/25"
i wrote reg ex like this: ^\d\d\d\d//\d\d/\d\d$ but it is not working
code is like this
$lin = "2011/05/25 07:24:58 -0700 PDT";
$lin =~ m/^\d\d\d\d//\d\d/\d\d$/;
print "$lin\n";
plz suggest
They are two slashes in a row; change the first to a backslash:
m/^\d\d\d\d\/\d\d/\d\d$/;
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/