Well, your regex doesn't mention newlines :/)
your data has newlines
all that dumpoff stuff has newlines in between
its like whitespace :)
add that ( [\r\n ]+ ) to your pattern
And quotemeta
use Path::Tiny qw/ path /; my $raw = path( $file )->slurp_raw; my $re = qr{ \Q$dumpoff $end\E [\r\n ]+ (\#[\d]+) [\r\n ]+ \Q$dumpon $end\E [\r\n ]+ (.*?) \#[\d]+ }sx; while( $raw =~ m/$re/g ){ my( $id, $tidy ) = ( $1, $2 ); ... }
In reply to Re: extract text from multi-line context
by Anonymous Monk
in thread extract text from multi-line context
by herman4016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |