Skip to content

← ToolsText & CSS

Regex tester.

Live JavaScript regex matching with flags, capture-group tables and a cheatsheet. Input-capped for safety.

Client-onlyJS RegExp
Pattern2 matches
Groups · first match
$1aisha
$2example.com
?‹user›aisha
?‹host›example.com

Cheatsheet

. — any char

\d — digit

\w — word char

\s — whitespace

* — 0+

+ — 1+

? — 0/1

{2,4} — repeat

^…$ — anchors

(…) — group

(?:…) — non-group

a|b — either

[a-z] — range

[^…] — negate

\b — boundary

(?<n>…) — named

🔒 Privacy — runs 100% locally

No uploads · no cookies · works offline after load. View Source if you don't believe it.

How to use.

  1. Type a pattern — matches highlight live with a count.
  2. Toggle flags g/i/m/s/u/y and inspect the group table.
  3. Use the cheatsheet for syntax you forget monthly.

Related tools.

FAQ.

Which flavor?

JavaScript (RegExp) — lookbehind and named groups supported per your browser. PCRE-only features like recursion won't work.

Can a bad pattern hang my tab?

Inputs are capped at 20k chars and 200 matches shown. Pathological patterns can still spin — keep quantifiers nested carefully.