You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regex loses a capture from the last successful repetition #1759
Thank you for this report, and the many others! We intend to work through the issues in the coming days and weeks.
In-depth testing of RegExp is very welcome. XS uses its own RegExp engine, optimized for small devices. This engine has allowed us to support the many enhancements made to JavaScript regular expressions over the years. But that also means that it is not entirely surprising that you've found some divergences from the standard. You can learn a bit more about the approach on our blog post, A smaller, more compatible regular expression engine for XS.
Because most of your test cases are small, it can be more convenient just to pass them as strings to execute on the command line rather than a separate file. (No need to update your reports. This is just FYI.)
xst -e 'print(String(/(a|)*c/.exec("ac")[1]));'
You can also pass multiple strings:
xst -e 'print(1);' 'print(2);' 'print(3);'
XS generally maintains excellent compatibility with test262. From our first look, it appears none of the RegExp issues you've reported to this repository are covered by test262. It would be great to have cases for them added to test262 to contribute to TC39's goal of ensuring consistency across engines.
Activity
phoddie commentedon Oct 13, 2026
Thank you for this report, and the many others! We intend to work through the issues in the coming days and weeks.
In-depth testing of RegExp is very welcome. XS uses its own RegExp engine, optimized for small devices. This engine has allowed us to support the many enhancements made to JavaScript regular expressions over the years. But that also means that it is not entirely surprising that you've found some divergences from the standard. You can learn a bit more about the approach on our blog post, A smaller, more compatible regular expression engine for XS.
Because most of your test cases are small, it can be more convenient just to pass them as strings to execute on the command line rather than a separate file. (No need to update your reports. This is just FYI.)
You can also pass multiple strings:
XS generally maintains excellent compatibility with test262. From our first look, it appears none of the RegExp issues you've reported to this repository are covered by test262. It would be great to have cases for them added to test262 to contribute to TC39's goal of ensuring consistency across engines.
phoddie commentedon Oct 29, 2026
The fix for this issue will be included in Moddable SDK 10.1.0.
XS: regex loses a capture from the last successful repetition #1759