in reply to Re: how to write multi-line regex
in thread how to write multi-line regex

Thanks Ken and everyone for your kindly reply, following is based on Ken's code,
#!/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/; } }