core-js icon indicating copy to clipboard operation
core-js copied to clipboard

[RegExp] Incomplete `sticky` flag support implementation / [email protected]+ breaks [email protected] patterns on IE11

Open psmyrdek opened this issue 5 years ago • 13 comments

Related to: https://github.com/angular/angular-cli/issues/17375

There are two issues with XRegExp and core-js I noticed recently:

1) On [email protected] this script causes endless loop:

import 'core-js/features/regexp';
import XRegExp from 'xregexp';
window['XRegExp'] = XRegExp; // only to test some patterns in dev tools console

When using [email protected] everything works fine.

2) Pattern that is working fine in [email protected] now breaks (the \s, whitechar range, is gone)

I'm trying to test the following code:

import XRegExp from 'xregexp';
window['XRegExp'] = XRegExp;

console.log(XRegExp('(^((?=[uuuuuuuuu\\sxxxxxxxxx\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}/])[^;\\\\<>{}])*$)|(^$)'))
console.log(XRegExp('(^((?=[uuuuuuuuu\\sxxxxxxxxx\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}/])[^;\\\\<>{}])*$)|(^$)').test('test me'));

Both uuu... and xxx... added only to see effects in the browser)

And I see two different regexp patterns that got built by xregexp:

[email protected] - spaces work fine image

[email protected] - spaces break the pattern (notice lack of x chars and \s at the beginning) image

psmyrdek avatar Apr 13 '20 10:04 psmyrdek

We experienced the described issue on IE11 with version 3.6, when reverted to 3.5.0 it works.

kassenov avatar Apr 17 '20 01:04 kassenov

One solution may be to use https://www.npmjs.com/package/babel-plugin-transform-xregexp and build patterns in build time. Haven't tested it properly yet - feedback welcomed.

psmyrdek avatar Apr 22 '20 14:04 psmyrdek

Seeing the same issue as well

walkerdb avatar Apr 24 '20 16:04 walkerdb

Looks like a duplicate of #751

steveworkman avatar May 27 '20 12:05 steveworkman

Still having the same issues. Any updates regarding the issue ?

kabbany avatar Jun 29 '20 14:06 kabbany

Seems on xregexp side added a workaround, but it should be fixed on core-js side.

zloirock avatar Nov 05 '20 17:11 zloirock

#754 related

zloirock avatar Nov 05 '20 17:11 zloirock

I'm facing the same issue as part of Stencil JS development which currently includes [email protected]. When will this bug be fixed?

gtranter avatar Aug 05 '21 14:08 gtranter

@gtranter when someone will fix it. Working on it is not in my plans.

zloirock avatar Aug 05 '21 14:08 zloirock

Update: The retired, out-of-support Internet Explorer 11 desktop application has been permanently disabled through a Microsoft Edge update on certain versions of Windows 10.

IE11 visual references, such as the IE11 icons on the Start Menu and taskbar, will be removed by the June 2023 Windows security update (“B” release) scheduled for June 13, 2023.

https://techcommunity.microsoft.com/t5/windows-it-pro-blog/internet-explorer-11-desktop-app-retirement-faq/ba-p/2366549

Probably time to close this issue since they killed IE11 this month with new update.

Yevgeniy-C avatar Feb 26 '23 15:02 Yevgeniy-C

@Yevgeniy-C here this approach does not work - a couple of times a month someone writes me even about IE6 support. In core-js@4 will be removed IE8- support - but most likely IE9-11 still will be supported. Also, it's related to other old engines.

zloirock avatar Feb 26 '23 15:02 zloirock

I thought that Microsoft forced users to delete IE and switch to edge with new update this month. Not just stopped supporting but actually deleted IE on users computers.

On Sun, Feb 26, 2023, 9:57 AM Denis Pushkarev @.***> wrote:

@Yevgeniy-C https://github.com/Yevgeniy-C here this approach does not work - a couple of times a month someone writes me even about IE6 support. In @.*** will be removed IE8- support - but most likely IE9-11 still will be supported. Also, it's related to other old engines.

— Reply to this email directly, view it on GitHub https://github.com/zloirock/core-js/issues/810#issuecomment-1445395754, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPRQ5FNHHFH7SDISLGWVETWZN4PZANCNFSM4MG4B6XA . You are receiving this because you were mentioned.Message ID: @.***>

Yevgeniy-C avatar Feb 26 '23 16:02 Yevgeniy-C

@Yevgeniy-C it's problematic to delete it from PCs that do not receive actual updates - I'm pretty sure that it's most IE users. 0.7% according to current data is a fairly large share of users. A share of other ancient engines (iOS, Android, etc) without the support of this feature is comparable. CanIUse shows that it's about 4.17% at all.

zloirock avatar Feb 26 '23 16:02 zloirock