#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1201392 use strict; use warnings; local $/ = '<footer>'; open my $fh, '<', \<<END; <blockquote> <p><b>Joos van Cleve</b> - Lucretia (detail)</p> </blockquote> <p>beautiful</p> </blockquote> <p>indeed I am</p> <footer><a href END while(<$fh>) { /^(.*)\n.*<footer>/m and print $1 =~ s/<.*?>//gr; }
In reply to Re: Matching regular expression over multiple lines
by tybalt89
in thread Matching regular expression over multiple lines
by Maire
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |