Regex Tester
//g
About this tool
Regex Tester supports real-time match highlighting, capture group inspection and string replacement. Includes common pattern presets and a syntax cheatsheet.
Supports g/i/m/s/u flags. Replacement supports $1 backreferences.
Frequently asked questions
Which regex flavor does it use?
It uses JavaScript (ECMAScript) regular expressions, matching what runs in browsers and Node.js.
What do the flags mean?
g matches all occurrences, i ignores case, m makes ^ and $ match line boundaries, s lets the dot match newlines. Toggle them to see live results.
Can I test replacements?
Yes, enter a replacement string with $1, $2 group references to preview the replaced output instantly.