You can process your file simply line-by-line.
Or you may use HTML::Parser if your html files are not well formatted.#!/usr/bin/perl use strict; use warnings; use diagnostics; my $start = '<START>'; my $end = '<END>'; foreach (<DATA>) { chomp; print "$1\n" if /$start(.+)$end/; } __DATA__ <START>TEXT1<END> <various data> <START>TEXT2<END> <various data> <START>TEXT3<END>
In reply to Re: Search all occurences of text delimited by START and END in a string
by pme
in thread Search all occurences of text delimited by START and END in a string
by natol44
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |