Thread regex match: mehrere ausdrücke in EINER Zeile
(4 answers)
Opened by maxmaster69 at 2007-06-23 22:07
Hallo,
Danke für eure schnellen antworten!! Das Ding funktioniert jetzt!! Einen kleinen Fehler hatte ich noch, in dem ich in der while-schleife (zum zeilenweisen einlesen eines files) mit einer if-bedingung abfragte und somit nur die erste url bekam. das ganze sieht jetzt so aus, UND FUNKTIONIERT $>cat test-file.txt <http://woswoasi.ru/bild1.jpg,<a>,http://koschosei.ro/bild2.jpg,<irgendwas in tags>,error,http://desletzte/bild.jpg> $>cat url-extract.pl [...] while ($line = <IN>) { if ($line =~ m/(http.+?\.jpg)/g) { print OUT "wget -c $1\n"; } } close (OUT); close (IN); $>url-extract.pl test-file.txt $>cat wget-c-files.bat wget -c http://woswoasi.ru/bild1.jpg wget -c http://koschosei.ro/bild2.jpg wget -c http://desletzte/bild.jpg danke nochmal für alle meldungen!! |