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

. in RegExp literals

Expand Messages
  • Douglas Crockford
    I have been convinced that . in Regular Expression literals is dangerous because it usually does not precisely match what was intended. That can lead to
    Message 1 of 2 , Mar 15, 2008
    View Source
    • 0 Attachment
      I have been convinced that . in Regular Expression literals is
      dangerous because it usually does not precisely match what was
      intended. That can lead to reliability and even secure problems.

      JSLint now has a 'regexp' option to reject /./.
    • Donavon West
      ... I think this is a good option. I m not sure if I will use it (at least not at first) but this has me thinking more about my regular expressions and using
      Message 2 of 2 , Mar 15, 2008
      View Source
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
        wrote:
        >
        > I have been convinced that . in Regular Expression literals is
        > dangerous because it usually does not precisely match what was
        > intended. That can lead to reliability and even secure problems.
        >
        > JSLint now has a 'regexp' option to reject /./.
        >
        I think this is a good option. I'm not sure if I will use it (at least
        not at first) but this has me thinking more about my regular
        expressions and using "." haphazardly.
      Your message has been successfully submitted and would be delivered to recipients shortly.