Free Regex Tester (JavaScript)
Write a pattern, paste test text, and see matches highlighted live · with capture groups, flags, and match positions.
100% client-side · nothing you enter is ever sent to a server or stored.
Preview · sign in with a free account to run it
How to use it
- Type the pattern without slashes, and set flags such as g, i or m.
- Paste the text to test it against.
- Read the highlighted matches and the match table, with each match's index and capture groups.
Example
Input
Pattern (\w+)@(\w+)\.com flags: g Text Contact ada@example.com or linus@kernel.com
Result
2 matches #1 index 8 ada@example.com groups: ada, example #2 index 27 linus@kernel.com groups: linus, kernel
Reading the result
- g flag
- Without g, only the first match is reported, the same as String.match in JavaScript.
- Capture groups
- Each ( … ) captures part of the match. Named groups (?<name>…) are shown by name.
- No matches
- Check escaping: . matches any character, and \. matches a literal dot.
- Flavour
- JavaScript (ECMAScript), the regex engine your browser and Node.js run. Patterns from PCRE or Python mostly work, with small differences.
Go deeper
Page updated
Frequently asked questions
Which regex flavor is this?
JavaScript (ECMAScript) · the flavor your frontend and Node.js code actually run. Most patterns port from PCRE, but lookbehind support and some escapes differ, so testing in the target flavor matters.
What is catastrophic backtracking (ReDoS)?
Patterns with nested quantifiers like (a+)+ can take exponential time on crafted input · a denial-of-service vector if the pattern runs server-side on user input. Prefer specific character classes over nested .* quantifiers.
Can a regex take down my server?
Yes. Nested quantifiers such as (a+)+ or (.*)* can take exponential time on crafted input (ReDoS). Avoid them in any pattern that runs on user input on your server.
Want the full picture?
This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.
Run a full security scanRelated tools
Cron Parser
Paste any cron expression and get a plain-English schedule plus the next five run times · no more guessing what */15 2,14 * * 1-5 means.
Semver Checker
Enter a version range like ^4.2.0 and a version to test · see whether it matches and what the range actually allows.
URL Parser
Paste any URL and see every part broken out · protocol, host, path, and each query parameter decoded into a readable table.