Desert Forge IT — Arizona IT · Field-tested tools & guidesFree consult →

Regex Tester

Test JavaScript regular expressions live with match highlighting and capture groups.

//

      
0 matches
Matches
Quick reference cheatsheet
\d \w \sDigit, word char, whitespace
\D \W \SNegations
[abc] [^abc]Char class / negated class
[a-z]Range
. * + ?Any, 0+, 1+, 0 or 1
{n} {n,} {n,m}Quantifiers
.*?Lazy quantifier
^ $Start / end of string (or line w/ m)
\b \BWord boundary / non-boundary
(abc)Capture group
(?:abc)Non-capturing group
(?<name>abc)Named group
a|bAlternation
(?=abc) (?!abc)Lookahead / negative
flags: g i m s u yglobal, case-insensitive, multiline, dotall, unicode, sticky

How to use

Type a regular expression pattern in the Pattern field and any flags (g, i, m, s, u, y) in the flags input. Type or paste a test string below. Matches are highlighted in the test string and listed in the Matches table along with capture groups and indices. Invalid patterns show an error message.

Related Tools

Stuck on this in production? Desert Forge IT does remote Linux, Proxmox, and self-hosting work by the hour.

Email [email protected]·(480) 200-1795