--- In email@example.com
, "douglascrockford" <douglas@...> wrote:
> The confusion is with the sequence -]. Does it mean
> JSLint is not smart enough to figure that out. Neither are most of us.
> So code it like you mean it.
Changing the sequence to /[-\.\/]/g gives me "Unescaped '-'."
This was the message I was looking for in the first place.
I have to escape the '-', not the ']'!
(The '-' can be used to create a set: /[a-z\.\/]/g will replace all characters a through z, the '.' and the '\' character).