Huáng Jùnliàng 8ffca0475a Merge multiple regex transform plugin (#10447)
* feat: implement create-regexp-features-plugin

* fix: test input is not effective

* refactor: leverage create-regexp-features-plugin

* test: add more test cases

* test: update test fixture

* chore: add type annotation to features

* test: add regression test for issue 9892

* add regression test for issue 9199

* address review comments from Nicolò

* address review comments from Brian

* small tweaks

* Enable dotAllFlag when flags includes u
2019-10-29 22:58:04 +01:00

8 lines
142 B
JavaScript

const regex = /<(?<tag>\d)+>.*?<\/\k<tag>>/su;
const result = regex.exec('<0>xxx\nyyy</0>');
expect(result.groups).toEqual({
tag: "0"
});