Use the /m modifier. This will treat the string as multiple lines, allowing you to use \n characters as part of your regexp.Bullshit.
You don't need any modifier to use \n in your regexp. The /m modifier will change the meaning of ^ and $, irrelevant for the OP. He may need the /s modifier, which makes the dot match a newline.
In reply to Re^2: regexp over multiple lines
by JavaFan
in thread regexp over multiple lines
by liverpaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |