M
mmk16
I need to extract all text in a HTML page between two patterns like
<!-- cachedResultsStart --> and <!-- cachedResultsEnd -->.
I am trying something like
my $start_tag = '<!-- cachedResultsStart -->';
my $end_tag = '<!-- cachedResultsEnd -->';
my $num_lines = /$start_tag/ .. /$end_tag/ ;
if ($num_lines ) {
/$start_tag(.+?)$end_tag/m ;
$this_is_what_i_need = $1 ;
}
print $this_is_what_id_need ;
I used this approach from an earlier posting by Uri Guttman
However, this is not working for me.
<!-- cachedResultsStart --> and <!-- cachedResultsEnd -->.
I am trying something like
my $start_tag = '<!-- cachedResultsStart -->';
my $end_tag = '<!-- cachedResultsEnd -->';
my $num_lines = /$start_tag/ .. /$end_tag/ ;
if ($num_lines ) {
/$start_tag(.+?)$end_tag/m ;
$this_is_what_i_need = $1 ;
}
print $this_is_what_id_need ;
I used this approach from an earlier posting by Uri Guttman
However, this is not working for me.