Test, validate and match regular expressions
Matches JavaScript variable declarations beginning with 'var ' (where the variable name does not start with a digit), capturing the name in group 1, then matches any subsequent occurrence of that captured name via backreference. The gm flags enable line-by-line matching and finding all occurrences. Useful for locating variable declarations and tracking their usages in code, e.g., in linters or simple code analysis tools.