Regex Tester
Write a regular expression and test it against sample text live — with match highlighting, capture group labels, and flag toggles.
Global (g)
Case Insensitive (i)
Multiline (m)
Dotall (s)
Matches Highlighted
Enter test text above
Free · No sign-up · Runs in your browser
How to use
- Type a regular expression in the pattern field.
- Paste or type test text in the input area below.
- Matches are highlighted live as you type.
- Toggle flags (g, i, m, s) with the checkboxes.
- Scroll the match table to inspect each match, its index, and capture groups.
Questions
What regex engine is used?
JavaScript's built-in RegExp engine (ECMAScript). Syntax is standard JS regex — no PCRE extensions like \K or lookbehind are supported in older browsers, but modern browsers support most PCRE-like features.
Why do I get 'Invalid regular expression'?
The pattern contains a syntax error — an unclosed group, an unescaped special character, or an unsupported flag. The error message below the pattern field describes what went wrong.
Does anything leave my browser?
No. The expression is built and tested entirely in JavaScript in your browser — nothing is sent to a server.
Advertisement