ROBOTCRASH

🔎 Regex Tester

Test JavaScript regular expressions against any string, toggle the g/i/m/s flags, and see every match with its index and capture groups — with a friendly error for invalid patterns, all in your browser.

🧪 Match, Group & Debug

What is a Regex Tester?

A regex tester compiles your pattern and runs it against sample text so you can see exactly what it matches before you ship it. It surfaces each match, its position, and any capture groups, and reports invalid patterns instead of failing silently.

Use it to build and debug patterns for validation, search-and-replace, log parsing, and data extraction — iterating on your test string until the matches are precisely what you intend.

❓ Frequently Asked Questions

Which regex flavor does this use?

It uses JavaScript's built-in RegExp engine, the same one that runs in Node.js and every modern browser. Patterns you validate here behave identically in your JavaScript and TypeScript code, so there are no surprises when you paste the pattern into a project.

What do the g, i, m, and s flags mean?

g (global) finds every match instead of just the first; i (ignore case) makes the pattern case-insensitive; m (multiline) lets ^ and $ match at line breaks; and s (dotAll) lets the dot match newline characters too. Toggle them to see how each changes the result.

How are capture groups shown?

Each match lists its full text, its index in the input, and the contents of every capture group in order. That makes it easy to confirm your parentheses are grabbing exactly the sub-strings you expect before you rely on the pattern in code.

What happens if my pattern is invalid?

Instead of crashing, the tool catches the error and shows the engine's message — for example an unterminated group or an invalid quantifier — so you can fix the pattern. Testing and matching all run locally in your browser, so nothing you paste is uploaded.