browser.js |
|
0 |
cross-realm.js |
---
esid: sec-regexp.escape
description: escape called with a RegExp object from another realm
features: [RegExp.escape, cross-realm]
--- |
748 |
escaped-control-characters.js |
---
esid: sec-encodeforregexescape
description: Encodes control characters with their ControlEscape sequences
info: |
EncodeForRegExpEscape ( c )
2. If c is the code point listed in some cell of the “Code Point” column of Table 64, then
a. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains c.
ControlEscape, Numeric Value, Code Point, Unicode Name, Symbol
t 9 U+0009 CHARACTER TABULATION <HT>
n 10 U+000A LINE FEED (LF) <LF>
v 11 U+000B LINE TABULATION <VT>
f 12 U+000C FORM FEED (FF) <FF>
r 13 U+000D CARRIAGE RETURN (CR) <CR>
features: [RegExp.escape]
--- |
1229 |
escaped-lineterminator.js |
---
esid: sec-regexp.escape
description: Escaped lineterminator characters (simple assertions)
info: |
EncodeForRegExpEscape ( c )
...
3. Let otherPunctuators be the string-concatenation of ",-=<>#&!%:;@~'`" and the code unit 0x0022 (QUOTATION MARK).
4. Let toEscape be StringToCodePoints(otherPunctuators).
5. If toEscape ..., c is matched by WhiteSpace or LineTerminator, ..., then
a. If c ≤ 0xFF, then
i. Let hex be Number::toString(𝔽(c), 16).
ii. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), "x", and StringPad(hex, 2, "0", START).
b. Let escaped be the empty String.
c. Let codeUnits be UTF16EncodeCodePoint(c).
d. For each code unit cu of codeUnits, do
i. Set escaped to the string-concatenation of escaped and UnicodeEscape(cu).
e. Return escaped.
6. Return UTF16EncodeCodePoint(c).
LineTerminator ::
<LF>
<CR>
<LS>
<PS>
Exceptions:
2. If c is the code point listed in some cell of the “Code Point” column of Table 64, then
a. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains c.
ControlEscape, Numeric Value, Code Point, Unicode Name, Symbol
t 9 U+0009 CHARACTER TABULATION <HT>
n 10 U+000A LINE FEED (LF) <LF>
v 11 U+000B LINE TABULATION <VT>
f 12 U+000C FORM FEED (FF) <FF>
r 13 U+000D CARRIAGE RETURN (CR) <CR>
features: [RegExp.escape]
--- |
2270 |
escaped-otherpunctuators.js |
---
esid: sec-regexp.escape
description: Escaped other punctuators characters
info: |
EncodeForRegExpEscape ( c )
...
3. Let otherPunctuators be the string-concatenation of ",-=<>#&!%:;@~'`" and the code unit 0x0022 (QUOTATION MARK).
4. Let toEscape be StringToCodePoints(otherPunctuators).
5. If toEscape contains c, (...), then
a. If c ≤ 0xFF, then
i. Let hex be Number::toString(𝔽(c), 16).
ii. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), "x", and StringPad(hex, 2, "0", START).
b. Let escaped be the empty String.
c. Let codeUnits be UTF16EncodeCodePoint(c).
d. For each code unit cu of codeUnits, do
i. Set escaped to the string-concatenation of escaped and UnicodeEscape(cu).
e. Return escaped.
6. Return UTF16EncodeCodePoint(c).
codePoints
0x002c ,
0x002d -
0x003d =
0x003c <
0x003e >
0x0023 #
0x0026 &
0x0021 !
0x0025 %
0x003a :
0x003b ;
0x0040 @
0x007e ~
0x0027 '
0x0060 `
0x0022 "
features: [RegExp.escape]
--- |
1950 |
escaped-solidus-character-mixed.js |
---
esid: sec-regexp.escape
description: Escaped U+002F (SOLIDUS) characters (mixed assertions)
info: |
EncodeForRegExpEscape ( c )
1. If c is matched by SyntaxCharacter or c is U+002F (SOLIDUS), then
a. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and UTF16EncodeCodePoint(c).
features: [RegExp.escape]
--- |
1077 |
escaped-solidus-character-simple.js |
---
esid: sec-regexp.escape
description: Escaped U+002F (SOLIDUS) character (simple assertions)
info: |
EncodeForRegExpEscape ( c )
1. If c is matched by SyntaxCharacter or c is U+002F (SOLIDUS), then
a. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and UTF16EncodeCodePoint(c).
features: [RegExp.escape]
--- |
1098 |
escaped-surrogates.js |
---
esid: sec-encodeforregexescape
description: Encodes surrogates correctly
info: |
EncodeForRegExpEscape ( c )
4. Let toEscape be StringToCodePoints(otherPunctuators).
5. If toEscape contains c, c is matched by WhiteSpace or LineTerminator, or c has the same numeric value as a leading surrogate or trailing surrogate, then
a. If c ≤ 0xFF, then
...
b. Let escaped be the empty String.
c. Let codeUnits be UTF16EncodeCodePoint(c).
d. For each code unit cu of codeUnits, do
i. Set escaped to the string-concatenation of escaped and UnicodeEscape(cu).
e. Return escaped.
6. Return UTF16EncodeCodePoint(c).
features: [RegExp.escape]
--- |
12657 |
escaped-syntax-characters-mixed.js |
---
esid: sec-regexp.escape
description: Escaped characters (mixed assertions)
info: |
RegExp.escape ( string )
This method produces a new string in which certain characters have been escaped.
These characters are: . * + ? ^ $ | ( ) [ ] { } \
features: [RegExp.escape]
--- |
2436 |
escaped-syntax-characters-simple.js |
---
esid: sec-regexp.escape
description: Escaped characters (simple assertions)
info: |
RegExp.escape ( string )
This method produces a new string in which certain characters have been escaped.
These characters are: . * + ? ^ $ | ( ) [ ] { } \
features: [RegExp.escape]
--- |
1854 |
escaped-utf16encodecodepoint.js |
---
esid: sec-encodeforregexescape
description: UTF16EncodeCodePoint is called for remaining codepoints
info: |
EncodeForRegExpEscape ( c )
3. Let otherPunctuators be the string-concatenation of ",-=<>#&!%:;@~'`" and the code unit 0x0022 (QUOTATION MARK).
4. Let toEscape be StringToCodePoints(otherPunctuators).
5. If toEscape contains c, c is matched by WhiteSpace or LineTerminator, or c has the same numeric value as a leading surrogate or trailing surrogate, then
...
6. Return UTF16EncodeCodePoint(c).
features: [RegExp.escape]
--- |
2689 |
escaped-whitespace.js |
---
esid: sec-regexp.escape
description: Escaped WhiteSpace characters (simple assertions)
info: |
EncodeForRegExpEscape ( c )
...
3. Let otherPunctuators be the string-concatenation of ",-=<>#&!%:;@~'`" and the code unit 0x0022 (QUOTATION MARK).
4. Let toEscape be StringToCodePoints(otherPunctuators).
5. If toEscape ..., c is matched by WhiteSpace or LineTerminator, ..., then
a. If c ≤ 0xFF, then
i. Let hex be Number::toString(𝔽(c), 16).
ii. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), "x", and StringPad(hex, 2, "0", START).
b. Let escaped be the empty String.
c. Let codeUnits be UTF16EncodeCodePoint(c).
d. For each code unit cu of codeUnits, do
i. Set escaped to the string-concatenation of escaped and UnicodeEscape(cu).
e. Return escaped.
6. Return UTF16EncodeCodePoint(c).
WhiteSpace ::
<TAB> U+0009 CHARACTER TABULATION
<VT> U+000B LINE TABULATION
<FF> U+000C FORM FEED (FF)
<ZWNBSP> U+FEFF ZERO WIDTH NO-BREAK SPACE
<USP>
U+0020 (SPACE) and U+00A0 (NO-BREAK SPACE) code points are part of <USP>
Other USP U+202F NARROW NO-BREAK SPACE
Exceptions:
2. If c is the code point listed in some cell of the “Code Point” column of Table 64, then
a. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains c.
ControlEscape, Numeric Value, Code Point, Unicode Name, Symbol
t 9 U+0009 CHARACTER TABULATION <HT>
n 10 U+000A LINE FEED (LF) <LF>
v 11 U+000B LINE TABULATION <VT>
f 12 U+000C FORM FEED (FF) <FF>
r 13 U+000D CARRIAGE RETURN (CR) <CR>
features: [RegExp.escape]
--- |
2647 |
initial-char-escape.js |
---
esid: sec-regexp.escape
description: Escapes the initial character if it is a decimal digit or an ASCII letter
info: |
RegExp.escape ( string )
1. If S is not a String, throw a TypeError exception.
2. Let escaped be the empty String.
3. Let cpList be StringToCodePoints(S).
4. For each code point c in cpList, do
a. If escaped is the empty String, and c is matched by DecimalDigit or AsciiLetter, then
i. NOTE: Escaping a leading digit ensures that output corresponds with pattern text which may be used after a \0 character escape or a DecimalEscape such as \1 and still match S rather than be interpreted as an extension of the preceding escape sequence. Escaping a leading ASCII letter does the same for the context after \c.
ii. Let numericValue be the numeric value of c.
iii. Let hex be Number::toString(𝔽(numericValue), 16).
iv. Assert: The length of hex is 2.
v. Set escaped to the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), "x", and hex.
b. Else,
i. Set escaped to the string-concatenation of escaped and EncodeForRegExpEscape(c).
5. Return escaped.
features: [RegExp.escape]
--- |
14098 |
is-function.js |
---
esid: sec-regexp.escape
description: RegExp.escape is a function
info: |
RegExp.escape is a built-in function of the RegExp object.
features: [RegExp.escape]
--- |
570 |
length.js |
---
esid: sec-regexp.escape
description: >
RegExp.escape.length property descriptor
info: |
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
features: [RegExp.escape]
--- |
634 |
name.js |
---
esid: sec-regexp.escape
description: >
RegExp.escape.name property descriptor
info: |
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
features: [RegExp.escape]
--- |
637 |
non-string-inputs.js |
---
esid: sec-regexp.escape
description: Non-string inputs throw a TypeError
info: |
RegExp.escape ( string )
This method throws a TypeError if the input is not a string.
features: [RegExp.escape]
--- |
1221 |
not-a-constructor.js |
---
esid: sec-regexp.escape
description: >
RegExp.escape does not implement [[Construct]], is not new-able
info: |
ECMAScript Function Objects
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified in
the description of a particular function.
sec-evaluatenew
...
7. If IsConstructor(constructor) is false, throw a TypeError exception.
...
includes: [isConstructor.js]
features: [RegExp.escape, Reflect.construct]
--- |
1018 |
not-escaped-underscore.js |
---
esid: sec-encodeforregexescape
description: Ensures the underscore character is not escaped
info: |
RegExp.escape ( string )
This method produces a new string in which certain characters have been escaped.
These characters are: . * + ? ^ $ | ( ) [ ] { } \ , - = < > # & ! % : ; @ ~ ' ` " and white space or line terminators.
features: [RegExp.escape]
--- |
1824 |
not-escaped.js |
---
esid: sec-regexp.escape
description: Numbers and alphabetic characters are not escaped
info: |
RegExp.escape ( string )
This method produces a new string in which certain characters have been escaped.
These characters are: . * + ? ^ $ | ( ) [ ] { } \
features: [RegExp.escape]
--- |
1452 |
prop-desc.js |
---
description: The property descriptor RegExp.escape
esid: sec-regexp.escape
info: |
17 ECMAScript Standard Built-in Objects
features: [RegExp.escape]
includes: [propertyHelper.js]
--- |
607 |
shell.js |
|
0 |