RegExps that don't modify global state?
addslashes at yandex.ru
Wed Sep 17 20:57:54 PDT 2014
`lastIndex` also prevents usage of one instance in parallel...
the idea to "deprecate" lastIndex was proposed 4 years ago:
More information about the es-discuss