What happens when you specify RegexOptions.ECMAScript?

Raymond Chen

The RegexOptions.ECMAScript flag changes the behavior of .NET regular expressions. One of the changes I had discussed earlier was with respect to matching digits. For those who want to know more, a summary of the differences is documented in MSDN under the devious title “ECMAScript vs. Canonical Matching Behavior”.

Apparently some people had trouble finding that page, so I figured I’d point to it explicitly.


Discussion is closed.

Feedback usabilla icon