in reply to Matching a range of lines using a regex (the .. and ... operators)

The trouble is not with regexp but with lines to match.

But we can fix them:

my $prev = ''; LINE: while ( <> ) { next LINE if "$prev$_" =~ m/\.{4}<B.*ird>/s .. /(\+\=\+)$/; print; $prev = $_; }
  • Comment on Re: Matching a range of lines using a regex (the .. and ... operators)
  • Download Code