Thread Daten suchen / filtern
(20 answers)
Opened by testy at 2013-11-26 13:32 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 my $data = q[<1385156932|22.11.2013 21:48:52>020220040818022e10030b0202020202200408180e2b10030202200408180e2b10030202020220040818022d1003080202020220040818022c1003090202020202200408180e281003010202022004081903301003150220040818022b10030e0202 <1385157053|22.11.2013 21:50:53>20040819081910033702 <1385157053|22.11.2013 21:50:55>020204087C01121003370202 <1385157132|22.11.2013 21:52:12>200421ab04641003dd02200421ab0610101003bb]; for my $line (split(/\n/, $data)) { my ($date, $line_data) = split(/>/, $line, 2); $date .= '>'; while ($line_data =~ /(?P<DATASET>(2004|04).*?)1003/g) { print $date.$+{DATASET}."\n"; } } 1 + 1 = 10
|