(?:.|\n) is unnecessary slow due to the alternation. (?s:.) doesn't suffer from that.
ihb
See perltoc if you don't know which perldoc to read!
Read argumentation in its context!
In reply to Re^2: RegEx: Why is [.] not a valid character class?
by ihb
in thread RegEx: Why is [.] not a valid character class?
by hoppfrosch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |