Open anentropic opened 4 years ago
JS regex flavour defines a set of escape codes prefixed with \c:
\c
\cX: Matches a control character using caret notation, where "X" is a letter from A–Z (corresponding to codepoints U+0001–U+001F). For example, /\cM/ matches "\r" in "\r\n".
\cX
"X"
U+0001–U+001F
/\cM/
"\r"
"\r\n"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes https://www.ecma-international.org/ecma-262/5.1/#sec-15.10.1
Another example:
/\ca/.test('\u0001') -> true
But currently it seems like RandExp treats \ca as "escaped c followed by a":
\ca
c
a
new RandExp(/\ca/).gen() -> "ca" /\ca/.test("ca") -> false
JS regex flavour defines a set of escape codes prefixed with
\c
:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes https://www.ecma-international.org/ecma-262/5.1/#sec-15.10.1
Another example:
But currently it seems like RandExp treats
\ca
as "escapedc
followed bya
":