* 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
8 lines
112 B
JavaScript
8 lines
112 B
JavaScript
const regex = /(?<=a)(?<a>[a])/
|
|
|
|
const result = regex.exec("aa");
|
|
|
|
expect(result.groups).toEqual({
|
|
a: "a"
|
|
});
|