#!/usr/bin/perl use strict; use diagnostics; use 5.010; open my $fh, $ARGV[0] or die "File $ARGV[0] not found!\n"; my $re = qr{TEXT;\s+LAYER 13[1-7];\s+TEXTTYPE 0;.*?STRING ([^;:]+)}s; { local $/ = ""; while (<$fh>) { say $1 if /$re/; } }
In reply to Re^2: how to write multi-line regex
by herman4016
in thread how to write multi-line regex
by herman4016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |