B
Bart Lateur
In Perl, matching any character, including newline, can be done with the
/s regexp switch, as /.+/s matches a string of any character.
Apparently, the Javascript RegExp engine doesn't recognize that switch.
So, what must I use? I'm now using
(?:.|\n)+
but looks inefficient to me: A character class is allegedly vastly
faster than an alternation.
I've thought of
.*(?:\n.*)*
but I have doubts about this one, too.
/s regexp switch, as /.+/s matches a string of any character.
Apparently, the Javascript RegExp engine doesn't recognize that switch.
So, what must I use? I'm now using
(?:.|\n)+
but looks inefficient to me: A character class is allegedly vastly
faster than an alternation.
I've thought of
.*(?:\n.*)*
but I have doubts about this one, too.