Thread regex: newbie frage zum ersetzen (s///) (14 answers)
Opened by Lutz at 2006-01-25 19:11

bloonix
 2006-01-25 19:54
#62245 #62245
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
my @datuemer = ( '2005-1-23',
                '2005-12-27',
                '2005-11-2',
                '2005-7-9',
);

s/(\d+)-(\d+)-(\d+)/sprintf '%04d-%02d-%02d', $1, $2, $3/e for @datuemer;
\n\n

<!--EDIT|opi|1138211731-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread regex: newbie frage zum ersetzen (s///)