How the Regex Tester Works
Type or paste a regex pattern (without the surrounding slashes), specify the flags (g, i, m, s, u, y), and a test string. The tester runs String.prototype.matchAll() against your input with the pattern compiled at every keystroke, highlighting each match and showing capture groups. Invalid patterns (unbalanced parens, bad escape sequences, undefined backreferences) produce a parse error with the exact problem so you can fix it incrementally rather than waiting for runtime.