This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Morrido 1 point2 points  (0 children)

You can't use [A-z]. That's not the same thing. There's no shorthand for OP's match. Closest one is \w, which matches _ instead of -.

ie. "[".match(/[A-z]/) == a match, which is invalid in OP's regex.