Fix typo in wrapRegExp helper (#9726)

This commit is contained in:
Nicolò Ribaudo
2019-03-21 00:18:43 +01:00
committed by GitHub
parent ab41cb2cda
commit bf94bb9d43
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
const regex1 = /(?<alpha>\w+):(?<bravo>\d+)/;
const regex2 = /(?<alpha>\w+):(?<bravo>[a-z]+):(?<charlie>\w+)/;
const result = regex2.exec("foo:abc:bar");
expect(result.groups).toEqual({
alpha: "foo",
bravo: "abc",
charlie: "bar",
});