Did you try reading in paragraph mode ($/ = "")? That should work provided that you don't have very long paragraphs and that your search phrase can't be split through paragraphs.
In reply to Re: use regular expressions across multiple lines from a very large input file
by ambrus
in thread use regular expressions across multiple lines from a very large input file
by rizzy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |