archives

« Bugzilla Issues Index

#3809 — Annex B: octal escapes in regular expressions


See https://javascript.spec.whatwg.org/#octal-escapes-in-regular-expression-literals

In existing implementations, the octal escape sequence syntax for string literals as described in Annex B of the ECMAScript spec also applies to regular expression literals, even in strict mode code.

/\123/.test('S'); // true

(function() {
'use strict';
console.log(/\123/.test('S')); // true
}());


This is already covered by B.1.4 (search for LegacyOctalEscapeSequence), where they are specified as supported for non-u-pattern.