Thread Elegante Syntax (9 answers)
Opened by bianca at 2013-04-06 18:30

Muffi
 2013-04-08 08:49
#166942 #166942
User since
2012-07-18
1465 articles
BenutzerIn
[default_avatar]
Oder mit Regex
Code (perl): (dl )
my @array = $string =~ /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/;


[EDIT]
Oder was mir auch ganz gut gef√§llt bei so einer un√ľbersichtlichen Ziffernwurscht sind diese named-captures.

Code (perl): (dl )
1
2
$string =~ /(?<Jahr>\d{4})(?<Monat>\d{2})(?<Tag>\d{2})(?<Stunde>\d{2})(?<Minute>\d{2})(?<Sekunde>\d{2})/;
foo($+{Jahr}, $+{Monat}, $+{Tag});

Last edited: 2013-04-08 08:56:50 +0200 (CEST)
1 + 1 = 10

View full thread Elegante Syntax