RegExp regression

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b89
    • Verified

      The following testcase used to capture groups, it doesn't capture anymore.

      var semver = "\\s*[v=]*\\s*([0-9]+)" // major
                 + "\\.([0-9]+)" // minor
                 + "\\.([0-9]+)" // patch
                 + "(-[0-9]+-?)?" // build
                 + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag
        , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$";
        var validComparator = new RegExp("^"+exprComparator+"$");
        
        // Matches should be: >=0.6.0-,>=,>,0.6.0-,0,6,0,,-
        print("Matches " + ">=0.6.0-".match(validComparator));

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: