◆ Online Dev Kit

Regex Tester

Test a regex and see all matches & groups, live.

About this tool

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.

Common use cases

How it works

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.

FAQ

Which regex flavor is this?

JavaScript (ECMAScript) regular expressions, the same engine used in Node.js and browsers.

What do the flags mean?

g = global (all matches), i = case-insensitive, m = multiline, s = dotall. The tool adds g automatically so you see every match.

Is my text uploaded?

No — matching runs locally in your browser.

What is the difference between .* and .+?

.* matches zero or more characters (greedy), while .+ matches one or more. Use * when the content is optional, + when at least one character is required.

How do I make regex case-insensitive?

Add the i flag. In JavaScript: /pattern/i. In most regex engines, this makes [a-z] match both uppercase and lowercase letters.