Regex Tester
Test a JavaScript regular expression against input and highlight every match.
The Regex Tester lets you test a regular expression against sample input and see every match highlighted, along with the captured groups. It is the fastest way to debug a pattern, confirm flags, or understand what an engine actually matches. You can toggle flags like global, case-insensitive, and multiline to see how each one changes the result, and the tool shows match positions so you can reason about overlaps and anchors. Use it whenever you are writing or fixing a regex for parsing logs, validating forms, or extracting values, and when you need a quick explanation of a tricky pattern without leaving the browser. Regular expressions are compact enough that a small mistake produces a pattern that still runs and just matches the wrong thing, which is why testing against real sample input matters more than reading the pattern. Starting from a simple version that matches the obvious case, then adding one construct at a time while watching how the highlighted matches change, keeps you from introducing a subtle backtracking trap you will only notice under a specific input. The flags are where most surprises live: making a pattern global changes whether you find every match or only the first, case insensitivity changes what the character classes touch, and multiline changes what the anchors mean. Captured groups deserve a second look because a group that appears to match may actually have captured more text than you intended, and that only becomes a bug once the value is consumed downstream. Because the tool shows match positions alongside the highlights, you can reason about anchors, word boundaries, and overlaps with evidence rather than guessing, and it runs locally so pasted log lines stay on your machine.
Frequently Asked Questions
Why does my regex match nothing?
Common causes: forgetting to escape . or /, wrong flags (missing g or i), or anchoring with ^ $ when you meant a partial match. The tester highlights every match so you can see what the engine sees.
What do the flags mean?
g = global (all matches), i = case-insensitive, m = multiline anchors. Picking the wrong set is the most frequent regex bug.
Is JavaScript regex enough?
For most web text it is. Lookbehind and named groups are supported in modern engines; very old targets may need a different flavor.