Skip to content
Jaskaran Singh logoJaskaran Singh

← ToolsText & CSS

Regex tester.

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

JS 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

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.

Sign in

Join the discussion.

One click with GitHub — your name and avatar come across. No passwords, no email verification step.

By continuing you agree to the comment policy: be kind, stay on topic, no spam. Moderated by the site owner.