vjeux/jsMatch — Issue #1: Don't auto-apply flags `ms`, since they cannot be turned off
Author: slevithan
Created: 2012-02-28 17:55:44+00:00
State: open

Currently, both `match` and `match.all` always pass the flags `m` and `s` when constructing a regex. IMHO, this is a bad idea, for two reasons:

* From my experience, it is at least as likely for users to want these flags off as to want them on. (Their usage merely affects the metacharacters `.`, `^`, and `$`, and has nothing to do with multi-line support, per se.)
* Since you're using [XRegExp](http://git.io/xregexp) to compile the provided string as a regex, users are able to turn on these flags when they want them by using a leading mode modifier (e.g., `match(str, '(?ms)regex')`). I added support in XRegExp for leading mode modifiers specifically for this kind of situation, where regex patterns can only be provided as strings.