- 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:
Luke Parkinson 2024-01-03 22:35:51 +00:00
parent 6ed9d4554a
commit 3f2f276823
1 changed files with 1 additions and 1 deletions

View File

@ -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";
}