Home › Regex Tester
Regex Tester
Type a regular expression and a test string to see matches highlighted live, count them, and inspect captured groups. Everything runs locally in your browser — your data is never uploaded.
What is a regex tester?
A regex tester lets you build and check a regular expression — a pattern used to search, match, and extract text — against sample input without writing any code. As you type, this tool runs your pattern with the JavaScript regular expression engine, highlights every match in the test string, counts how many it found, and breaks out any captured groups so you can confirm the pattern behaves exactly as intended before you drop it into your project.
How to use it
1. Type your pattern in the Regular expression field (no surrounding slashes needed — they are shown for you). 2. Toggle the flags you need below it. 3. Paste your text into the Test string box. Matches are highlighted live, the match count appears above the result, and each match's captured groups are listed underneath. If your pattern is invalid, the error message is shown in red and nothing breaks — just keep editing. Click Sample to load an example, or Clear to start over.
Regex flags explained
g (global) finds all matches instead of stopping at the first one. i (ignore case) makes the match case-insensitive, so abc matches ABC. m (multiline) makes the anchors ^ and $ match the start and end of each line rather than the whole string. s (dotAll) lets the dot . match newline characters too, which it normally skips.
Is my data safe?
Yes. This tester runs entirely in your browser using the built-in JavaScript RegExp engine. Nothing you type — neither your pattern nor your test string — is ever sent to a server.