Short answer: type the pattern without slashes, tick the flags you need, paste the text and press Test pattern. Every match is highlighted and listed with its index and capture groups; a replacement string produces the exact outputString.replace would give you.
Why the test needs a button
Most regex testers run on every keystroke. That is pleasant until you type(a+)+b and the engine starts backtracking on a 20 KB string: the tab freezes and there is no way to interrupt it. Here the work starts when you ask for it, the text is capped, and the run time is reported so a pattern that needs 900 ms is visible before it reaches production.
What the columns mean
- Index — where the match starts, in UTF-16 code units, the same number the engine reports.
- Match — the whole matched text, including anything captured by the pattern.
- Groups — numbered captures, then named groups shown as
name=value. - An unmatched optional group appears as an em dash, not an empty string, because the two mean different things in code.
Replace previews are exact
The preview calls String.prototype.replace with your flags, so $1,$&, $<name> and $$ behave as documented. With the g flag every match is replaced; without it only the first. An empty replacement deletes the matches, which is a legitimate way to strip them.
A pattern that works here produces the same result in Node and in the browser, but not necessarily in Python, PHP or Go — those are different engines. Keep that in mind when you paste an expression into a server-side validator.