← Profiterole

Regex Tester & Explainer

Paste a regular expression. See matches live. Get plain-English explanations. Free, no login.

Regular Expression
/ /
Try:
Test String
Quick Reference
.Any character except newline
\dAny digit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace (space, tab, newline)
\D \W \SNegated: non-digit, non-word, non-space
^ $Start / end of string (or line with m flag)
\bWord boundary
* + ?0+, 1+, 0 or 1 occurrences
{n} {n,m}Exactly n, between n and m times
[abc]Character class: a, b, or c
[^abc]Negated class: anything but a, b, c
(abc)Capturing group
(?:abc)Non-capturing group
a|bAlternation: a or b
(?=x)Lookahead: followed by x
(?<=x)Lookbehind: preceded by x
*? +? ??Lazy (non-greedy) quantifiers
(?<name>)Named capturing group
Flags
gGlobal — find all matches, not just first
iCase-insensitive — A matches a
mMultiline — ^ and $ match line start/end
sdotAll — . matches newline characters too
uUnicode — enables full Unicode matching
dIndices — include match start/end positions

This tool is free forever. If it saved you a Google search, consider buying me a coffee.

Buy me a coffee

More free tools from Profiterole: