Count words, characters, and reading time instantly.
Open toolRegex Tester
Test regular expressions live with match highlighting.
What is a regex tester?
This tool tests a regular expression against sample text live, highlighting every match directly in the text and listing each match with its capture groups. It supports standard flags (global, case-insensitive, multiline, dot-all, unicode) and named capture groups.
How to use this tool
- 1Type a pattern (without the surrounding slashes) into the Pattern field.
- 2Toggle the flags you need - g, i, m, s, u.
- 3Paste your test text - matches are highlighted live as you type.
- 4Scroll the match list below to see each match's captured groups and position.
Common use cases
Frequently asked questions
Why is the 'g' flag always effectively on?
To find and highlight every match in the text (not just the first), the tool internally searches globally regardless of whether you've toggled g - but the flag list shown next to your pattern reflects exactly what you've selected.
Does it support named capture groups?
Yes - groups written as (?<name>...) are shown by name alongside numbered groups in each match's details.
What happens if my pattern is invalid?
You'll see the exact JavaScript regex error (like an unterminated character class) instead of a silent failure or crash.
Is my text sent anywhere?
No - matching happens entirely in your browser using JavaScript's native regex engine.
{
"runs_in_browser": true,
"data_sent_to_server": false,
"signup_required": false,
"price": "free",
"category": "tools"
}
Related tools
Switch between camelCase, snake_case, kebab-case, and more.
Open tool