Regex Tester
Write a regular expression, toggle flags, and see every match highlighted in your test text with capture groups and counts. Runs in your browser, so nothing is uploaded.
Enter a pattern and test string to see matches.
RegExp engine in your browser. Nothing is uploaded or logged.About the Regex Tester
The Regex Tester lets you write a regular expression, toggle flags, and see every match highlighted inside your test text as you type. It shows the total match count and the captured groups for each match, and flags an invalid pattern with the exact error. It is built for developers, WordPress and API integrators, and anyone validating input or extracting data. Everything runs in your browser using the native RegExp engine, so your text never leaves your machine.
How it works
- Type a pattern into the pattern box. The leading and trailing slashes are shown for you.
- Toggle the flags you need: g, i, m, s, u, y.
- Paste or type your test string. Matches are highlighted live as you edit.
- Read the match count and open each match to see its position and captured groups.
Features
- Live highlighting of every match inside the test text.
- Flag toggles for g, i, m, s, u, and y.
- Per-match details: position, matched text, and numbered or named capture groups.
- Inline error message when the pattern is not valid.
- Runs on the native RegExp engine, fully client-side.
Frequently asked questions
Is my text uploaded anywhere?
No. The pattern and the test string are processed entirely in your browser using the native RegExp engine. Nothing is sent to a server or logged.
Which regex syntax does this use?
It uses JavaScript regular expressions through the browser's native RegExp. Syntax matches what you would write in JavaScript, which differs in some details from PCRE used in PHP or Python.
What do the flags do?
g finds all matches instead of stopping at the first. i ignores case. m makes ^ and $ match at line breaks. s lets the dot match newlines. u turns on Unicode mode. y anchors each match to the current position.
Why do I see only one match without the g flag?
Without the g (global) flag, the engine returns only the first match. Turn on g to highlight and list every match in the text.
How are capture groups shown?
Each match lists its numbered groups starting at group 1. If your pattern uses named groups, the names are shown instead. A group that did not participate in the match is marked as undefined.