Quoting the specification at http://www.ecma-international.org/ecma-262/6.0/index.html#sec-literals-regular-expression-literals :
" An implementation may extend the ECMAScript Regular Expression grammar defined in 21.2.1, but it must not extend the RegularExpressionBody and RegularExpressionFlags productions defined below or the productions used by these productions. " Why are implementations allowed to diverge on regular expressions this way? Has any implementation ever used this ability to extend the grammar? Does this mean that the source property of a regular expression isn't guaranteed to return a same "length"ed string for every implementation? Original discussion here: https://github.com/benjamingr/RegExp.escape/issues/27
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss