\\.
matches a literal backslash, followed by any character (the dot is not escaped).
From http://Sizzlejs.com/:
Escaped selector support #id\:value
It is used to match classes like a\~b
, and it is actually repeated in most selectors on your screenshots. It is common usually when you have dots or brackets in names or classes.
As for your test:
- In JavaScript, "invalid" escape sequences are ignored.
"\." === "."
, and your test is the same as.test('.aa.')
. .test
allows partial matching -/\w+/.test("a!") === true
- it doesn't mean the last dot was actually matched.