🚧 We’re making Tools Pasal better. Found a broken tool or have an idea? Tell us →

Developer tools

Regex Tester — Live Matches, Groups & Flags

Test JavaScript regular expressions as you type — highlighted matches, capture groups, named groups, and a timeout guard so runaway patterns can’t freeze the page.

//g

Quick reference

PatternMatches
\d · \w · \sdigit · word char · whitespace
+ · * · ? · {2,4}1+ · 0+ · optional · 2 to 4 times
^ · $ · \bstart · end · word boundary
(…) · (?<name>…) · (?:…)group · named group · non-capturing
[abc] · [^abc] · a|bcharacter set · negated set · alternation
(?=…) · (?!…)lookahead · negative lookahead

Handy Nepal-flavoured example: \b9[678]\d{8}\b matches a 10-digit Nepali mobile number starting 96/97/98.

Frequently asked questions

Which regex flavour does this tester use?

JavaScript (ECMAScript) — the same engine as Node.js and browsers. Most patterns work identically in Python/PCRE, but lookbehind syntax, \p{…} unicode properties and some anchors differ between flavours.

Why did my pattern time out?

Patterns with nested quantifiers like (a+)+ can backtrack exponentially (catastrophic backtracking, ReDoS). The tester runs your pattern in a worker with a 2-second limit so the page never freezes — if it times out, restructure the pattern (e.g. make quantifiers possessive-like with atomic alternatives or anchor it better).

How do I capture groups?

Wrap parts in parentheses: (\d{4})-(\d{2}) captures $1 and $2. Named groups use (?<year>\d{4}); both appear in the match table below the highlights.

Is my text uploaded?

No — everything runs locally in your browser (inside a Web Worker).

Related developer tools