Regex Tester
Test regex patterns
Regex Tester: Test regex patterns. A free, browser-based tool from DevToolbox that runs entirely on your own device: no upload, no account, no tracking.
About the Regex Tester
Write a regular expression and test text side by side, and see every match, its position and its capture groups update as you type, including the errors, when the pattern itself will not compile.
The pattern is compiled with the browser's own RegExp engine, so what you see here is exactly what your JavaScript will do. Flags behave the same way, and a pattern that fails to compile reports the engine's own message.
What you can do with it
- Regular expression tester
- Regex match online
- Regex validator
- Test regex patterns
How to use it
- Paste the text or data you want to examine.
- Adjust the pattern, options or comparison to suit what you are looking for.
- Results update live as you change either side.
- Copy what you need, or share a link that carries the input with it.
Questions
- Which regex flavour is this?
- ECMAScript, because it runs on the browser's RegExp engine. Patterns written for PCRE, Python or Go mostly transfer, but lookbehind support, named groups and Unicode property escapes differ between engines, so test them here before assuming.
- Why does my global pattern only match once?
- Without the g flag a regex stops at the first match. Add g to iterate over the whole input, and remember that a pattern which can match an empty string will need care to avoid looping.
- Is my data uploaded anywhere?
- No. The tool is JavaScript that runs in the tab you already have open, and DevToolbox has no backend to send anything to. You can open the network tab and watch: after the page and its script load, nothing is sent while you work.
Related tools
The Regex Tester sits in Testing & Analysis, one of the 90 tools on DevToolbox.