Here are a couple of fine points about Ecmascript regular expressions worth noting.
The '.' atom does not match the four line terminator characters LF, CR, LS, and PS. This is true irrespective of the presence of the multiline flag in the expression.
You indicate that a quantifier should be non-greedy by suffixing the pattern with '?'. For example, '.*?', '.+?', '.??' etc.
These points are true for most other regular expression implementations as well.