Huáng Jùnliàng 2e7bea4a6a fix: transform name capturing regex once (#10395)
* fix: transform name capturing regex once

* refactor: early return when pattern contains only lookbehind

* chore: simplify test regex

* chore: run test on >=8.0.0
2019-09-05 17:35:57 +02:00

8 lines
112 B
JavaScript

const regex = /(?<=a)(?<a>[a])/
const result = regex.exec("aa");
expect(result.groups).toEqual({
a: "a"
});