develooper Front page | perl.libwww | Postings from April 2001

how to get the text between two patterns

Thread Next
From:
ben goswami
Date:
April 27, 2001 06:59
Subject:
how to get the text between two patterns
Message ID:
008101c0cf22$4b9b98e0$2b0b0c18@smateo1.sfba.home.com
Hi,
What's the easiet way to get text between two patterns from an input file.  I'm doing it thru getting position etc. which is rather lengthy.  what about map function?

$start_pattern="aa";
$end_pattern="bb";
$file = $_;

$content = _xyz($file,$start_pattern,$end_pattern) 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About