Closed dzcpy closed 5 years ago
Assuming you're talking about the variables shown here: https://github.com/slevithan/xregexp/blob/2cb340a819b290c2d8638965fb7e825cfc0efbc4/src/xregexp.js#L41-L50
I believe they're used to implement the correct escape character behavior inside characters class (e.g. [a-z]
), which is different from the escaping behavior outside character classes. See here for more information on the difference: https://www.regular-expressions.info/charclass.html#special
Sorry if it's not a proper question, but I couldn't find any documentation explaining what does
scope
(default / class etc.) actually do. Can anyone shed me some light on this?