Developer Tools
Free Online Regex Tester
Enter a regular expression and sample text to see live, highlighted matches as you type.
How to use the regex Tester
- Type your regular expression pattern into the pattern field.
- Toggle flags: global (g), case-insensitive (i), multiline (m), or dot-all (s).
- Paste sample text into the text box.
- Matches highlight live, with a count and any captured groups listed below.
Example
Testing the pattern \d{3}-\d{4} against the text Call 555-1234 now highlights 555-1234 as a match.
Why test regex online?
Regular expressions are powerful but easy to get subtly wrong. Testing against real sample text before dropping a pattern into production code catches mistakes immediately, with visual feedback instead of trial-and-error debugging.
Live highlighting and groups
Matches are highlighted directly in your sample text as you type, and any capture groups within your pattern are listed separately so you can confirm they extract exactly what you expect.
Frequently asked questions
This tool uses JavaScript's native regular expression engine, which is very close to the ECMAScript-style syntax used by most modern languages.
g finds all matches instead of just the first, i ignores case, m makes ^ and $ match line boundaries, and s makes . match newlines too.
Yes, any groups defined with parentheses are extracted and listed separately below the highlighted matches.
No, pattern matching runs locally in your browser using JavaScript's built-in regex engine.