Thread Regulaere Ausdruecke
(11 answers)
Opened by Gast at 2008-11-21 10:13
Hier mal der Code mit split...
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #!/usr/bin/perl use warnings; use strict; while(my $zeile = <DATA>) { my @array = (); @array = split(/\./, $zeile); print join("\n", $array[0])."\n"; } # while __DATA__ Auto.VW.Golf.BJ Auto2.VW.Polo.BJ Auto3.Audi.A5.BJ Auto4.Audi.A4.BJ Auto5.Audi.A3.BJ Gruss, havi |