My regex is supposed to substitute a date in a larger csv file with the word 'TIMESTAMP'.
Example data
TEXT12, TEXT312, 22.11.2013 13:30:16, abcd,
Code
while(<>) {
s/[0-9]{2}.[0-9]{2}.[0-9]{4}\s[0-9]{2}:[0-9]{2}:[0-9]{2}/TIMESTAMP/;
print $_;
}
I checked the regex with RegexBuddy, it matches there successfully, but in the Perl program it doesn't work. Tried with Perl 5.14 and Perl 5.18 on Linux and Windows, no success.
Where is the mistake?!