The JavaScript exception "duplicate capture group name in regular expression" occurs when a regular expression pattern contains two or more named capturing groups with the same name, and these capture groups could be matched at the same time.... A more recent feature allows named capturing groups... as that would make other features, such as named backreferences...