Developer Tools tool
Regex Tester
Test regular expressions against sample text with real-time match highlighting.
Test regular expressions against sample text with real-time match highlighting, capture groups, and match positions. Free online regex tester.
Regular expression
Flags
Test string
Why people use this tool
Regex Tester lets you write and test regular expressions against sample text instantly, showing matches, positions, and capture groups in real time.
- Build and test regex patterns for form validation, parsing, or search.
- Debug complex regular expressions by examining match results and groups.
- Learn regex syntax with immediate visual feedback on matches.
How to use it
- 1Enter your regular expression pattern and set flags (g, i, m, etc.).
- 2Paste the test string you want to match against.
- 3Review highlighted matches, positions, and capture groups in the results.
FAQ
Helpful answersWhat are regex flags?
Flags modify how the pattern is applied. Common flags include g (global/all matches), i (case-insensitive), and m (multiline mode).
Does this tool show capture groups?
Yes. If your pattern includes parenthesized groups, the tool displays the captured values for each match.
Can I use this for JavaScript regex?
Yes. This tool uses the JavaScript regex engine, so patterns will behave the same as in your JavaScript code.