Loading ...
Sorry, an error occurred while loading the content.
 

Re: Slight regexp problem

Expand Messages
  • Douglas Crockford
    ... Thanks. Please try it now.
    Message 1 of 3 , Jul 18, 2009
      --- In jslint_com@yahoogroups.com, "pauanyu" <pcxunlimited@...> wrote:
      >
      > var regexp = /[]]/;
      >
      > I understand the second error is JSLint telling me I need to escape
      > the "]", and that's fine. The problem is the first error. It says I
      > need to escape "-", but there isn't any "-" in the code at all!

      Thanks. Please try it now.
    • pauanyu
      ... Yeah, that s better. What about the other weird characters like /[^]/ and /[-]/? Wouldn t those be empty class as well?
      Message 2 of 3 , Jul 18, 2009
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
        >
        > Thanks. Please try it now.
        >

        Yeah, that's better.

        What about the other weird characters like /[^]/ and /[-]/? Wouldn't those be "empty class" as well?
      Your message has been successfully submitted and would be delivered to recipients shortly.