diff --git a/README.md b/README.md index 6d1e01e..c6a5879 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ console.log(match.groups);
👉 Show more details -- Only one definition group is allowed per regex, and it must appear at the end of its pattern. Trailing whitespace and comments are allowed by implicit flag x. +- Only one definition group is allowed per regex, and it must appear at the end of its pattern (trailing whitespace and comments are allowed by implicit flag x). - At the top level of definition groups, only named groups, whitespace, and comments are allowed. - Within definition groups, all named groups must use unique names, and all are excluded from the `groups` object of resulting matches. - The word `DEFINE` must appear in uppercase. diff --git a/src/subroutines.js b/src/subroutines.js index 92838d5..a03a37a 100644 --- a/src/subroutines.js +++ b/src/subroutines.js @@ -202,7 +202,7 @@ function processDefinitionGroup(expression, namedGroups) { } } if (duplicateName) { - throw new Error(`Duplicate group name "${duplicateName}" within DEFINE"`); + throw new Error(`Duplicate group name "${duplicateName}" within DEFINE`); } contentsToken.lastIndex = group.afterPos; continue;