rbaecker@www-devel-rbaecker ~$ cat regex.pl #!/usr/bin/perl use strict; use warnings; my $string = q~var cars=new Array();cars[0]=new Car('http://pic.autoscout24.net/images-small/984/101/0136101984001.jpg','8 Bilder','/Details.aspx?id=bd1vul43oeno',false,'. 7.500,-','. 0,-','','25.000','06/1978','37/50','37 kW / 50','Bugatti EB 110 replica','','','','D-81673','München','','','Weiß','Bugatti','EB 110','Benzin',false,'bd1vul43oeno','Schaltgetriebe',false,'',false,'','',false);cars[1]=new Car('http://pic.autoscout24.net/images-small/826/783/0130783826001.jpg','6 Bilder','/Details.aspx?id=bdu23n3wqbss',false,'. 14.890,-','. 0,-','','1','08/1977','44/60','44 kW / 60','Bugatti EB 110 Bugatti 35 Replika','','','','D-51588','Nümbrecht','','','Blau','Bugatti','EB 110','Benzin',false,'bdu23n3wqbss','',false,'',false,'','',false);cars[2]=new Car('http://pic.autoscout24.net/images-small/475/774/0054774475001.jpg','15 Bilder','/Details.aspx?id=fe22yo2zsbk',false,'. 229.000,-','. 0,-','','17.670','08/1994','412/560','412 kW / 560','Bugatti EB 110 EB 110 GT*Deutsche Auslieferung*','','ABS, Alarmanlage, Allrad, Elektr. Fensterheber, Klima, Klimaautomatik, Lederausstattung, Zentralverriegelung','','D-53498','Bad Breisig','','','blau','Bugatti','EB 110','Benzin',false,'fe22yo2zsbk','Schaltgetriebe',false,'',false,'','',false);cars[3]=new Car('http://pic.autoscout24.net/images-small/105/745/0064745105001.jpg','2 Bilder','/Details.aspx?id=ge2yzluzmgp',false,'. 1.295.000,-','. 0,-','','0','-','736/1001','736 kW / 1001','Bugatti EB 110 Veyron 16.4','','ABS, Airbag, Alarmanlage, Beifahrer Airbag, Bordcomputer, Elektr. Fensterheber, Elektrische Sitze, Klima, Klimaautomatik, Lederausstattung...','','D-46325','Borken','','','silber oder rot Metallic','Bugatti','EB 110','Benzin',false,'ge2yzluzmgp','Automatik',false,'',false,'','',false);~; my @infos = split /new Car/, $string; shift @infos; my @cars; for my $elem ( @infos ){ my @parts = $elem =~ /'([^']*?)'/g; push @cars, [@parts[0,19,20,7,3]]; } use Data::Dumper; print Dumper \@cars; rbaecker@www-devel-rbaecker ~$ perl regex.pl $VAR1 = [ [ 'http://pic.autoscout24.net/images-small/984/101/0136101984001.jpg', 'Bugatti', 'EB 110', '06/1978', '. 7.500,-' ], [ 'http://pic.autoscout24.net/images-small/826/783/0130783826001.jpg', 'Bugatti', 'EB 110', '08/1977', '. 14.890,-' ], [ 'http://pic.autoscout24.net/images-small/475/774/0054774475001.jpg', 'Bugatti', 'EB 110', '08/1994', '. 229.000,-' ], [ 'http://pic.autoscout24.net/images-small/105/745/0064745105001.jpg', 'Bugatti', 'EB 110', '-', '. 1.295.000,-' ] ]; rbaecker@www-devel-rbaecker ~$