tc39 / proposal-regex-escaping

Proposal for investigating RegExp escaping for the ECMAScript standard
http://tc39.es/proposal-regex-escaping/
Creative Commons Zero v1.0 Universal
363 stars 32 forks source link

I'm confusing: where in the current spec text symbols like brackets or quantificators? #80

Closed zloirock closed 2 months ago

bakkot commented 2 months ago

The first step of EncodeForRegExpEscape:

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).

SyntaxCharacter is where most of the "normal" symbols live.

zloirock commented 2 months ago

Oh, thanks, I missed or here -)