Regex Tester
Test regular expressions with flags, matches, groups, and replace preview.
Pattern
Contact us at [redacted] or [redacted] for help.
Matches (2)
- #1index 14
hello@thetoolstoday.comGroups:1=hello2=thetoolstoday.com - #2index 41
support@example.orgGroups:1=support2=example.org
How to use Regex Tester
Enter a pattern and flags
Type your regular expression and select flags like g, i, m.
Provide test text
Paste sample text to see matches and capture groups.
Preview replacement
Optionally enter a replacement string to see the transformed result.
Frequently asked questions
Which regex flavor is used?
The JavaScript (ECMAScript) RegExp engine in your browser, matching behavior in JS/TS.
Why do I see no matches with ^ or $?
Without the m (multiline) flag, ^ and $ match the start/end of the whole string, not individual lines.
Can I test replacements?
Yes. Enter a replacement pattern (including $1 or $<name>) to preview the output.
Is my test data uploaded?
No. All matching runs locally in your browser.
What if my pattern is invalid?
The tool shows the RegExp syntax error so you can fix the pattern.
About Regex Tester
The Regex Tester helps you build and debug regular expressions against sample text. Enter a pattern and flags, view all matches with their positions and capture groups, and preview replacements in real time. It uses the JavaScript RegExp engine in your browser, so results match what you will see in JS/TS code and nothing you test is sent to a server.
Matching and flags
Regular expressions describe patterns in text. Flags change how matching works: `g` finds all matches instead of stopping at the first, `i` ignores case, `m` makes `^` and `$` match line boundaries, `s` lets `.` match newlines, and `u` enables Unicode-aware behavior. Toggling flags helps you understand why a pattern matches too much, too little, or not at all.
Groups and replacements
Parentheses create capture groups that extract parts of a match. The tester lists each match and its captured groups so you can verify numbering and content. In the replacement field you can reference groups with `$1`, `$2`, or named groups (e.g. `$<name>`) to preview transformed output before using the expression in code or a find-and-replace workflow.
Common pitfalls
Regexes can be tricky: greedy quantifiers may consume more than intended, unescaped special characters can change meaning, and patterns that can match empty strings may loop. The tool reports syntax errors immediately and limits match iterations for safety. Since evaluation happens locally, you can experiment freely with patterns against sensitive sample data.
Use Regex Tester on your site
This tool runs free and private in the browser. Paste it anywhere — blog posts, documentation, team wikis — and your visitors will use it without leaving your site. The embed includes a small "Made with The Tools Today" credit link.