RegexLab
Test regular expressions with live highlighting and capture groups.
Runs entirely in your browser — safe for patterns over sensitive data
Expression
0 matches
/
/
gimsu
Presets:
Test string
Highlighted
Replace (optional — use $1, $2 for groups)
Matches
Cheat sheet
. any char\d digit\w word char\s whitespace\b word boundary^ line start$ line end[abc] char set[^abc] negated seta* 0 or morea+ 1 or morea? optionala{2,4} 2–4 times(x) capture group(?:x) non-capturing(?<n>x) named groupa|b alternation(?=x) lookahead(?!x) neg. lookahead(?<=x) lookbehind*? lazy quantifier