Skip to main content

Regex Tester

Test regular expressions with real-time match highlighting, flags, and capture groups.

regexregexppatterntest
Read the guide
Shortcuts:⌘ KSearch
Enter a pattern and test string.

Frequently Asked Questions

Why am I only seeing one match when I expected all matches?

Without the `g` flag, the tester runs `regex.exec()` once and reports only the first match. Turn on the global flag to walk through the full string.

Can I inspect capture groups, not just the full match?

Yes. Each match card shows the full matched text, its index, and any numbered capture groups found in that match.

Why does the match list stop after 50 entries?

The side panel intentionally slices the results to the first 50 matches so the UI stays manageable. Highlighting in the textarea overlay still uses the full match set.

Which regex flags does this UI support?

The checkbox row covers `g`, `i`, `m`, `s`, and `u`, and the flags input strips out unsupported letters outside `gimsuy`. The actual matching behavior comes from the browser's JavaScript `RegExp` engine.

Why do I get an invalid regex error for a pattern that works somewhere else?

This tester is using the JavaScript regex engine in your browser. Flavor-specific syntax from PCRE, .NET, Java, or Python will fail here if JavaScript does not support it.

Related Tools