Thread Regulärer Ausdruck
(22 answers)
Opened by IceRage at 2009-11-02 21:45
Und hier noch ein Beispiel dazu:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #!/usr/bin/perl use strict; use warnings; my $str = q~<tr class="hgrau2 hr"><td width="65">Datum: 02.01.08</td> <td width="65">11,330</td><td width="65">12,330</td> <td width="65">13,330</td><td width="65">14,330</td>< td> </td></tr></table><div class="tb_ot"> Als Kursliste öffnen und drucken: <a class="pfeil" style="margin-left:10px;" href="javascript:p('popup_histo ..... ~; my @matched = $str =~ m/(\d{1,6},\d{1,3})/gm; { local $, = local $\ = $/; print @matched; } meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen! |