Skip to content
Developer

REGEX TESTER

Test regular expressions live with highlighted matches, capture groups, flags and instant error feedback. Presets + cheatsheet included.

Private by design No signup · Free
Flags

g global · i ignore case · m multiline · s dotall · u unicode

Presets
Cheatsheet
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] negate
Quantifiers
* 0+ · + 1+ · ? 0/1
{n} exact · {n,} min · {n,m} range
*? +? lazy versions
Anchors & groups
^ start · $ end · \b boundary
(...) capture · (?:...) non-capture
(?<name>...) named group
a|b alternation · \1 backreference
Flags
g all matches · i ignore case
m ^$ per line · s dot matches newline
u unicode · y sticky (engine only)
Share

Share link encodes pattern + flags + test string in the URL hash.

4 lines
Live Highlight
0
Matches
0
Groups
0ms
Exec time
0
Test chars
Valid pattern — no errors.
Match Groups
#MatchIndexGroups
No matches yet — adjust the pattern or test string.

Frequently Asked Questions

How does the Regex Tester work?
Type a pattern with flags g, i, m, s, u. Your test string highlights matches live with group table and match count. Errors show with position hints instantly.
Which flavor is supported?
JavaScript RegExp with Unicode mode. Most Python patterns work except lookbehind limits and atomic groups. The cheatsheet flags incompatible tokens.
Can I test multiline text?
Yes. Paste multiline logs and toggle m flag for caret per line plus s flag for dot matching newlines. Line numbers map each match.
How do I extract groups?
Use parentheses to capture. The groups table lists each index per match with copy buttons. Named groups show names where supported.
Can I share my regex via link?
Yes. Pattern, flags and test string encode into URL hash. Copy share link to send exact repro without server storage.
Is it free and private?
Yes, free unlimited with no sign-up. Evaluation runs locally in your browser and nothing uploads.

How to Use

01

Enter Pattern

Type regex without slashes and pick flags g i m s u. Errors highlight instantly.

02

Paste Test Text

Paste logs or samples. Matches highlight with count and positions.

03

Inspect Groups

Open groups table to copy captures per match for extraction.

04

Try Preset

Load email, URL, phone or date presets to learn by example.

05

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.

Was this tool helpful?

Search Tools

Start typing to find tools