If the dot matches all ASCII characters except newline and \n matches newline, why doesn't `"a\r\nb".match(/a(.|\n)*b/)` match?

47 views Asked by At

This gives a null on Chrome or NodeJS:

console.log("a\r\nb".match(/a(.|\n)*b/));

The (.|\n)* should mean "any ASCII character including newline, and any number of them: 0 or more).

0

There are 0 answers