Bug 259536

Summary: Positive look-behind RegExp doesn't match in JSC but does match in V8
Product: WebKit Reporter: Jarred Sumner <jarred>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: mark.lam, msaboff, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/oven-sh/bun/issues/3809

Description Jarred Sumner 2023-07-26 15:53:24 PDT
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
Comment 1 Radar WebKit Bug Importer 2023-07-26 20:44:37 PDT
<rdar://problem/112952197>
Comment 2 Michael Saboff 2023-08-14 18:21:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16694
Comment 3 EWS 2023-08-15 08:58:59 PDT
Committed 266912@main (caa31552bab4): <https://commits.webkit.org/266912@main>

Reviewed commits have been landed. Closing PR #16694 and removing active labels.