Why matches show up even without the g flag#
In JavaScript, the "g" (global) flag controls whether String.prototype.match returns one result or all of them — without it, most tools would show only the first match and leave you toggling a checkbox to see the rest. This tool always searches globally internally, so every match is visible regardless of whether "g" is checked; the checkbox instead reflects the flag combination you would actually use in code, since the other flags (case-insensitivity, multiline, dot-matches-newline) still change what counts as a match.
Numbered groups versus named groups#
(\d{4})-(\d{2}) captures two numbered groups, accessible in code as match[1] and match[2]. (?<year>\d{4})-(?<month>\d{2}) captures the same two values but as named groups, accessible as match.groups.year and match.groups.month — more readable in code that touches the pattern months later. Both forms are broken out separately under each match here, so it is clear which capture corresponds to which part of the pattern before it goes into actual code.
A pattern engine, not a pattern generator#
This tool executes the regular expression you write and shows you what it actually matches — it does not write the pattern for you, and it does not explain the syntax token by token. It is the fastest way to confirm a pattern behaves as expected against real sample data before it ships inside validation code, a .replace() call, or a router rule.