Regex Tester

flags
Replacement (optional)
Tips: Use $1, $2… for capture groups. In JS, $$ inserts a literal $. Named groups: $<name>.
Ready.

Preview (highlighted matches)

Matches

No matches yet.

Groups (for each match)

Replace / Split Output


    

Examples

Quick Cheat Sheet

Common
. any char (use s for newline too)
\d digit · \w word · \s space
\b word boundary · ^ start · $ end
Quantifiers
* 0+ · + 1+ · ? 0/1
{m} exact · {m,n} range · +? lazy
Groups
(...) capture · (?:...) non-capture
(?<name>...) named capture
Backrefs: \1 in pattern; $1 / $<name> in replace
Lookaround
(?=...) lookahead · (?!...) negative
(?<=...) lookbehind · (?<!...) negative LB
Flags
i ignore case · g global · m multiline
s dotAll · u unicode · y sticky · d indices

Cookies & privacy

Utilities Bunker uses necessary cookies to run the site. Optional cookies help remember preferences, measure usage, and improve the platform. You can change your choices any time. Privacy Policy.

Manage Cookies