WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
259536
Positive look-behind RegExp doesn't match in JSC but does match in V8
https://bugs.webkit.org/show_bug.cgi?id=259536
Summary
Positive look-behind RegExp doesn't match in JSC but does match in V8
Jarred Sumner
Reported
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
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-07-26 20:44:37 PDT
<
rdar://problem/112952197
>
Michael Saboff
Comment 2
2023-08-14 18:21:51 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/16694
EWS
Comment 3
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug