When browsers implement ES6 template strings, add tags XRegExp.r (regex as raw string) and
XRegExp.rx (regex with implicit free-spacing, as raw string). Don't need tag XRegExp.raw (raw
string), because you should be able to use, e.g., XRegExp(String.raw\w
). Don't need to support
flags /gy (which XRegExp doesn't allow in mode modifiers) with XRegExp.r/rx, since XRegExp methods
provide alternate mechanisms for /gy (scope 'all', the sticky option, lack of need for lastIndex
updating, and the XRegExp.globalize method if you really need it). All other flags (e.g., /im and
custom flags /snxA) can be applied via a leading mode modifier (e.g., XRegExp.r(?s).
).
If the above sounds confusing, keep in mind that you can simply maintain the status quo but still gain the benefits of raw multiline template strings (no more double escaping!) via, e.g.,