Regex Tester
Test regular expressions free online.
How to use this tool
Enter your pattern
Type your regex and pick flags — g for all matches, i to ignore case, m for multiline.
Add test text
Paste the string you want to test, or load one of the built-in examples.
Inspect matches
Matches highlight live with a full list of capture groups. Fix errors from the plain-English messages.
Frequently asked questions
Which regex flavor does this use?
JavaScript's RegExp engine — the same one that runs in every browser and in Node.js. Most patterns work identically in other flavors, but exotic features (like lookbehind limits or atomic groups) may differ.
What do the g, i, m flags do?
g (global) finds all matches instead of stopping at the first. i makes matching case-insensitive. m makes ^ and $ match at line starts/ends instead of only the string start/end.
Why is my pattern invalid?
Common causes: an unclosed [ bracket or ( group, a stray backslash at the end, or an invalid quantifier like a**. The error message above the preview tells you exactly what's wrong.
How do I match an email / URL / date?
Use the example buttons above the test box — they load proven patterns you can adapt. For production validation, remember regex alone can't fully validate emails; it just checks the shape.
Is my test data private?
Yes. Matching runs entirely in your browser with JavaScript. Nothing you type ever leaves your device.
Why is nothing highlighted?
Check three things: the pattern field isn't empty, the g flag is on if you expect multiple matches, and the pattern actually occurs in your test string — try the examples to see it working.
