... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2007-12-19

Ecmascript RegExp

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.


Blog Archive