use warnings; use strict; while( ) { if (/^"([^"]{2,})","(\d)","(.+)"$/) { chomp; my ($one, $two, $three) = ($1, $2, $3); print "matched: ``$_'' ('$one', '$two', '$three') \n"; } else { print "no match: ``$_'' \n"; } } __DATA__ "Sonntag, 26.05.2013 - 13:13:27","0","Lieber Herr % , & text text with some %special characters" xyzzy "Mittwoch, 05.06.2013 - 18:12:09","0","Besten Dank, & hat prima geklappt. {Greetings!}"