REGEX TESTER
Test regular expressions live with highlighted matches, capture groups, flags and instant error feedback. Presets + cheatsheet included.
g global · i ignore case · m multiline · s dotall · u unicode
Character classes
\d digit · \D non-digit\w word · \W non-word\s space · \S non-space. any char (or +s flag)[abc] set · [^abc] negateQuantifiers
* 0+ · + 1+ · ? 0/1{n} exact · {n,} min · {n,m} range*? +? lazy versionsAnchors & groups
^ start · $ end · \b boundary(...) capture · (?:...) non-capture(?<name>...) named groupa|b alternation · \1 backreferenceFlags
g all matches · i ignore casem ^$ per line · s dot matches newlineu unicode · y sticky (engine only)Share link encodes pattern + flags + test string in the URL hash.
| # | Match | Index | Groups |
|---|
Frequently Asked Questions
How does the Regex Tester work?
Which flavor is supported?
Can I test multiline text?
How do I extract groups?
Can I share my regex via link?
Is it free and private?
How to Use
Enter Pattern
Type regex without slashes and pick flags g i m s u. Errors highlight instantly.
Paste Test Text
Paste logs or samples. Matches highlight with count and positions.
Inspect Groups
Open groups table to copy captures per match for extraction.
Try Preset
Load email, URL, phone or date presets to learn by example.
Share or Copy
Copy pattern with flags or share link with encoded test case.
How to Calculate
Matching uses new RegExp(pattern, flags) with matchAll iteration. Groups come from match indices. Invalid patterns throw SyntaxError shown with message and position.
About the Regex Tester
The Regex Tester validates JavaScript RegExp with live highlighting, matchAll iteration, group and named-group extraction, preset library for email/URL/phone/date, and cheatsheet for flags g/i/m/s/u plus multiline and Unicode modes that mirror real runtime behavior.
Runs entirely locally with shareable hash links, SyntaxError position hints and no account — type pattern, paste test text, inspect groups, and copy.
Related Tools
Methodology & feedback
Figures run locally in your browser from the values you enter (page updated ). Estimates are educational only — verify finance, tax and health decisions with a qualified professional (see Disclaimer). Spotted an error? Report it via contact and we correct with a new update date.