[Webkit-unassigned] [Bug 259536] New: Positive look-behind RegExp doesn't match in JSC but does match in V8

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 26 15:53:24 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=259536

            Bug ID: 259536
           Summary: Positive look-behind RegExp doesn't match in JSC but
                    does match in V8
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jarred at jarredsumner.com

Reproduction:
```
const print = globalThis.print ?? console.log;
const re =
  /(?<=^v?|\sv?)(?:(?:0|[1-9]\d{0,9}?)\.){2}(?:0|[1-9]\d{0,9})(?:-(?:--+)?(?:0|[1-9]\d*|\d*[a-z]+\d*)){0,100}(?=$| |\+|\.)(?:(?<=-\S+)(?:\.(?:--?|[\da-z-]*[a-z-]\d*|0|[1-9]\d*)){1,100}?)?(?!\.)(?:\+(?:[\da-z]\.?-?){1,100}?(?!\w))?(?!\+)/;
const res = re.exec("v1.0.1448");
print(res);
```

`res` is null in jsc shell

In Node, `res` is:

```
[ '1.0.1448', index: 1, input: 'v1.0.1448', groups: undefined ]
```

This is running on a build of JSC from July 23rd

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230726/9e2d746a/attachment.htm>


More information about the webkit-unassigned mailing list