If escaped characters in a regular expression created in JavaScript with the RegExp object need to be escaped again how does the following code in sizzle.js work -
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+"
If \\\\\\\ = \
and \\\w = \w
then how does \0 = \0
when only a single backslash is used?
When run in Google console identifier
is "(?:\\\\.|[\w-]|[^-\\xa0])+"
Is this a mistake or am I not understanding correctly? If this is correct and this is how it is intended to work what is the purpose of \0
?