Regex Tester & Validator
Test, validate, and debug regular expressions with live match highlighting. Check if your pattern is valid, see every match and capture group, and try find-and-replace — all in real time.
Flags (modify how the pattern matches):
hello@toolingdock.com14support@example.org39How to use this regex tester
Enter your regular expression
Type or paste your pattern into the regex field. A green indicator confirms it's valid — if there's a syntax error, you'll see exactly what's wrong.
Paste your test text
Add the text you want to check your pattern against — a sample string, a paragraph, or real data you're working with.
Review the highlighted matches
Every match is highlighted in yellow instantly as you type. The match count and a detailed breakdown — including capture groups and index positions — appear below.
Optionally replace matches
Expand the replace section to substitute every match with new text, using $1, $2 to reference capture groups. Copy the result when you're done.
Quick regex reference
\d+One or more digits\w+One or more word characters\sAny whitespace character^Start of string$End of string(a|b)Match a or b[a-z]Any lowercase lettera{2,4}Between 2 and 4 of a(?=...)Positive lookahead\bWord boundaryFrequently asked questions
What is a regex tester used for?
A regex tester lets you check whether a regular expression pattern correctly matches the text you expect, before using it in real code. It shows which parts of your text match, highlights them, and helps you debug patterns that aren't working as intended.
How do I validate a regular expression online?
Paste your pattern into the regex field and a test string into the text box. If the pattern is syntactically valid, you'll see a green 'Valid pattern' indicator and any matches highlighted below. If it's invalid, the exact error is shown immediately.
What do the regex flags g, i, m, and s mean?
g (global) finds all matches instead of stopping at the first one. i (ignore case) makes the match case-insensitive. m (multiline) makes ^ and $ match the start and end of each line. s (dot all) makes the dot character also match newlines.
Does this regex tester send my text to a server?
No. All pattern matching runs entirely in your browser using JavaScript's built-in regex engine. Your text and pattern are never uploaded or stored anywhere.