diff --git a/src/core/operations/RegularExpression.mjs b/src/core/operations/RegularExpression.mjs
index 152c276e..c014394d 100644
--- a/src/core/operations/RegularExpression.mjs
+++ b/src/core/operations/RegularExpression.mjs
@@ -227,6 +227,7 @@ function regexList (input, regex, displayTotal, matches, captureGroups) {
*/
function regexHighlight (input, regex, displayTotal) {
let output = "",
+ title = "",
m,
hl = 1,
i = 0,
@@ -241,8 +242,16 @@ function regexHighlight (input, regex, displayTotal) {
// Add up to match
output += Utils.escapeHtml(input.slice(i, m.index));
+ title = "Offset: " + m.index + "
";
+ if (m.length > 1) {
+ title += "Groups:
";
+ for ( let n = 1; n < m.length; ++n) {
+ title += n + ": " + m[n] + "
";
+ }
+ }
+
// Add match with highlighting
- output += "" + Utils.escapeHtml(m[0]) + "";
+ output += "" + Utils.escapeHtml(m[0]) + "";
// Switch highlight
hl = hl === 1 ? 2 : 1;