Regex Tester

Test JavaScript regular expressions live. Match highlighting, capture groups, replace mode, and all flags supported.

/ /
Matches
0

Regex flag reference

FlagEffect
gGlobal — find all matches, not just the first
iCase-insensitive matching
mMultiline — ^ and $ match line starts/ends, not just string boundaries
sdotAll — . also matches newlines
uUnicode — proper handling of surrogate pairs and Unicode property escapes
ySticky — match must start at lastIndex

Capture groups

Parentheses (...) capture matched substrings. Named groups use (?<name>...). Non-capturing groups use (?:...) when you need to group without capturing. In replace mode, refer back to captures with $1, $2, etc., or $<name> for named groups.

Common JavaScript-specific differences