jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.
https://jerryscript.net
Apache License 2.0
6.89k stars 669 forks source link

Regex bug #5037

Open Georgezxh opened 1 year ago

Georgezxh commented 1 year ago

Description

Hi. The code below does not have the same output as other engines (e.g., V8 in Google Chrome,SpiderMonkey in Firefox,chakra in Edge,quickjs,jerryscript).

JerryScript revision

3.0.0

Build platform

ubuntu20.04

Test case

var regex=/(?:(\s)((?:\w*\1)){1,8}){2,5}/ regex.exec(" A B C D E F G H I ")

Output

A B C D E F G H I , ,I

Expected behavior

A B C D E F G H , ,