Closed zloirock closed 11 months ago
If I understand correctly, with the current spec draft logic, we have:
const string = '40'; const escaped = RegExp.escape(string); // => '\\x40' const re = new RegExp(escaped); // => /\x40/ re.test('40'); // => false re.test('@'); // => true
Is this expected behavior?
It seems it should be something like \x340.
\x340
You're right, we should be hex encoding the the digit in this case.
Yes, the intention is to hex encode.
If I understand correctly, with the current spec draft logic, we have:
Is this expected behavior?