Nik, check out perldoc perlre which will tell you all about the character classes including \d. To answer your question:
$xronos =~ s/:\d{2} \d{4}//g;
Of course, substitution isn't always the answer, you could simply do:
substr($xronos,-8) = "";
and get the same results.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: Problem with s///
by antirice
in thread Problem with s///
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |