« Bugzilla Issues Index
#3809 — Annex B: octal escapes in regular expressions
- bug_id:
3809
- creation_ts:
2015-02-10 06:00:00 -0800
- short_desc:
Annex B: octal escapes in regular expressions
- delta_ts:
2015-02-10 13:05:20 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 32: February 2, 2015 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
INVALID
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Mathias Bynens
- assigned_to:
Allen Wirfs-Brock
- cc:
["claude.pache", "mathias"]
- commentid:
12280
- comment_count:
0
- who:
Mathias Bynens
- bug_when:
2015-02-10 06:00:01 -0800
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
}());
- commentid:
12290
- comment_count:
1
- who:
Claude Pache
- bug_when:
2015-02-10 12:57:01 -0800
This is already covered by B.1.4 (search for LegacyOctalEscapeSequence), where they are specified as supported for non-u-pattern.