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

Re: regex parsing - [^]

Expand Messages
  • george_weilenmann
    from http://www.regular-expressions.info/javascript.html JavaScript implements Perl-style regular expressions. However, it lacks quite a number of advanced
    Message 1 of 13 , Jan 19, 2013
    • 0 Attachment
      from http://www.regular-expressions.info/javascript.html

      JavaScript implements Perl-style regular expressions. However, it lacks quite a number of advanced features available in Perl and other modern regular expression flavors:

      No \A or \Z anchors to match the start or end of the string. Use a caret or dollar instead.
      Lookbehind is not supported at all. Lookahead is fully supported.
      No atomic grouping or possessive quantifiers.
      No Unicode support, except for matching single characters with \uFFFF.
      (Note form me on this: only the oldest implementations suffer this limitation today)
      No named capturing groups. Use numbered capturing groups instead.
      No mode modifiers to set matching options within the regular expression.
      No conditionals.
      No regular expression comments. Describe your regular expression with JavaScript // comments instead, outside the regular expression str

      [^] is confusing and definitely should be avoided.

      --- In jslint_com@yahoogroups.com, "Felix E. Klee" wrote:
      >
      > On Sat, Jan 19, 2013 at 3:01 AM, george_weilenmann
      > wrote:
      > > Given that this is unique to JavaScript I'd say that JSLint is in the
      > > right as it is confusing.
      >
      > So, which regular expression syntax should JSLint enforce? POSIX? Is
      > that even compatible with the implementation in JavaScript?
      >
      > Given that there are many dialects of regular expressions and not one
      > single authoratitive standard, in my opinion, JSLint should enforce:
      >
      > Regular expressions as defined by ECMAScript. :-)
      >
      > (minus dangerous constructs)
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.