And the thing is, your code works for multiple lines. When I substituted your regex with /(class).*(pattern)/si, and planted an appropriate file with 'class' and 'pattern' each on its own line, the regex matched and list.txt had a line in it.
So you don't have a problem with multiline matching, you have a problem with your regex not matching the text you want to match.
In reply to Re: help needed with match multiple lines
by jethro
in thread help needed with match multiple lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |