Test a regex and see all matches & groups, live.
Test JavaScript-flavored regular expressions against sample text and instantly see every match, its position, and any capture groups. Adjust the pattern and flags (like g, i, m) and results update live. Invalid patterns show the exact error. Everything runs in your browser.
Regular expressions (regex) are patterns that describe sets of strings. The tester compiles your regex pattern using the JavaScript RegExp engine, then applies it to the test input using methods like match(), exec(), or test(). It highlights all matches, shows capture groups, and reports match positions. Flags like g (global), i (case-insensitive), and m (multiline) modify matching behavior.
JavaScript (ECMAScript) regular expressions, the same engine used in Node.js and browsers.
g = global (all matches), i = case-insensitive, m = multiline, s = dotall. The tool adds g automatically so you see every match.
No — matching runs locally in your browser.
.* matches zero or more characters (greedy), while .+ matches one or more. Use * when the content is optional, + when at least one character is required.
Add the i flag. In JavaScript: /pattern/i. In most regex engines, this makes [a-z] match both uppercase and lowercase letters.