http://www.perlmonks.org?node_id=201522


in reply to multi-line regex match quest

$ret = $1 if $g =~ /\n\s*\n((?m:^#.*\n)+)$id/;
-sauoq
"My two cents aren't worth a dime.";