. (the decimal point) doesn't do what I thought it did. I thought
. meant "match any character." You too? Yeah. But it doesn't. Specifically,
. doesn't match line terminators (so,
\u2029). From Section 184.108.40.206:
Atom :: .evaluates as follows:
- Let A be the set of all characters except LineTerminator.
- Call CharacterSetMatcher(A, false) and return its
...which if you spend really quite a long time looking tells you that
. matches anything but line terminators.
Maybe I'm just parading my ignorance here, but I would have thought that absent the "multiline" flag or something,
. matched everything. Nope. If you want to do that, use
[\s\S] (e.g., everything that either is or isn't whitespace).