Thread Namen aus String extrahieren (11 answers)
Opened by hugenyn at 2011-04-05 12:50

topeg
 2011-04-05 19:47
#147403 #147403
User since
2006-07-10
2611 articles
BenutzerIn

user image
Ich würde noch abfragen, ob die Zeile trifft:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
while(my $line = <DATA>)
{
  chomp $line;
  my @data;
  if(
      @data = $line =~ /^(.*?)\s+(\d{4})\s*(.+?)\s*$/ and
      push(@data,split(/\s+/,pop(@data))) > 8
    )
  { push @$res, \@data; }
  else
  { warn(qq(line "$line" not martch!\n))}
}

View full thread Namen aus String extrahieren