From the Chrome console, I noticed this oddity:
/[^A-z]/.test("^") false /[A-z]/.test("^") true "^".charCodeAt(0) 94 "A".charCodeAt(0) 65 "z".charCodeAt(0) 122 /[a-zA-Z]/.test("^") false It would make sense that caret matches in the range of 65-122 since it's character code is 94, but I didn't realize that /[A-z]/ is not equivalent to /[a-zA-Z]/.
So I guess my question is, does javascript use ASCII codes for ranged matches like A-z? And is that the explanation for this behavior?
EDIT:
After some further investigation, this appears to be true
String.fromCharCode(91) "[" String.fromCharCode(92) "\" String.fromCharCode(93) "]" String.fromCharCode(94) "^" String.fromCharCode(95) "_" String.fromCharCode(96) "`" /[^A-z]/.test("^[\\_`") false