RegExps that don't modify global state?

Viktor Mukhachev addslashes at yandex.ru
Wed Sep 17 20:57:54 PDT 2014


`lastIndex` also prevents usage of one instance in parallel...
I know the javascript do not support parallel execution, but the code is not so beatiful...

the idea to "deprecate" lastIndex was proposed 4 years ago:

see
http://blog.stevenlevithan.com/archives/fixing-javascript-regexp
http://esdiscuss.org/topic/proposal-for-exact-matching-and-matching-at-a-position-in-regexp



More information about the es-discuss mailing list