in reply to Matching Multiple Multiple-Line Regex

Remove all the parenthesis from $startstring, $keywords and $endstring, and write:
@finds = $data =~ m/(?:$keywords)\s*.{0,1500}\s*$startstring(.*?)$ends +tring/gis;
But do note that if your text is:
Security Ownership bla bla <table>Foo bar</table> more than 5% <table>Text text</table> All Directors and Executive Officers <table>Even more text</table>
@finds will only get one entry: "Even more text", due to the greediness of .{0,1500}.

Replies are listed 'Best First'.
Re^2: Matching Multiple Multiple-Line Regex
by kbone (Novice) on Feb 21, 2012 at 02:26 UTC
    Thank you so much for your reply!