mirror of https://github.com/gchq/CyberChef.git
- add regex group names
When using regex operation, if including named capture groups then output the name of the group in the 'List matches with capture groups' output format.
This commit is contained in:
parent
6ed9d4554a
commit
3f2f276823
|
@ -203,7 +203,7 @@ function regexList(input, regex, displayTotal, matches, captureGroups) {
|
|||
if (captureGroups) {
|
||||
for (let i = 1; i < match.length; i++) {
|
||||
if (matches) {
|
||||
output += " Group " + i + ": ";
|
||||
output += " Group " + i + " (" + regex.xregexp.captureNames[i - 1] + "): ";
|
||||
}
|
||||
output += match[i] + "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue