in reply to Custom date string formatting
You were very close to an answer. You just needed to capture the time part in fourth set of parenthesis and then toss it by not referring to it.
Assuming that there's always just one space between the date and the time:
$date =~ s/(\d{4})\-(\d{2})\-(\d{2})(\s.+)/$3\.$2\.$1/;
non-Perl: Andy Ford
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Custom date string formatting
by nelio (Novice) on Feb 01, 2007 at 14:04 UTC |