Regex Tester
Write a pattern and see exactly what it matches. Every match is listed with its position in the text and the contents of each capture group, including named groups — which is usually what you actually need when a pattern nearly works but not quite. Case-insensitive, multiline and dot-matches-newline flags are all switchable.
Enter a pattern to start matching.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Lists every match with its position in the text
- Shows numbered and named capture groups for each match
- Toggles for the i, m and s flags
- Reports an invalid pattern clearly instead of failing silently
How it works
- 1Paste the text you want to search.
- 2Type your pattern and set any flags you need.
- 3Read the matches and capture groups underneath.
Regex Tester — frequently asked questions
JavaScript's, since it runs in your browser. It's very close to PCRE for everyday patterns, but lookbehind is only supported in newer browsers and there is no \A or \z anchor — use ^ and $ with the multiline flag off.
More developer tools
Looking for something else? Browse all developer tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.