G
Giulio
hi,
I am developing a script for extracting data from some webpages I got
with wget.
I am using pattern matching to extract a list of items from the file.
Each item is composed by several properties, contained on different
lines of the page, which must be kept together (they're of course in
order and there's a multiline pattern to find them out one by one).
so far I arrived to the code (at the end of the msg) that matches
greatly, but data on single lines of the pages.
how can I do this pattern matching from the file and obtain the full
multiline pattern?
thanx
G
------------------
open (FILE, "<$file") || die("error in opening file");
while ($f = <FILE>) {
if ($f =~ /^.*<a href="\/photos\/(.*)\/(.*)\/" title="(.*)">/ ) {
$userName = $1;
$imageCode = $2;
------------------
I am developing a script for extracting data from some webpages I got
with wget.
I am using pattern matching to extract a list of items from the file.
Each item is composed by several properties, contained on different
lines of the page, which must be kept together (they're of course in
order and there's a multiline pattern to find them out one by one).
so far I arrived to the code (at the end of the msg) that matches
greatly, but data on single lines of the pages.
how can I do this pattern matching from the file and obtain the full
multiline pattern?
thanx
G
------------------
open (FILE, "<$file") || die("error in opening file");
while ($f = <FILE>) {
if ($f =~ /^.*<a href="\/photos\/(.*)\/(.*)\/" title="(.*)">/ ) {
$userName = $1;
$imageCode = $2;
------------------