Regex tester
Test a regular expression and see what it does: matches highlighted in the text, every capture group listed, a replace panel, and the pattern read back to you piece by piece. Flags are toggles that say what they change, and a pattern that could freeze the page is flagged before you run it.
Related tools
All Web & network tools →This free regex tester lets you build and debug regular expressions live. Type a pattern, paste your test text, and see every match highlighted in real time — with flags for global, case-insensitive and multiline matching. It's the fastest way to check a regex before dropping it into your code.
How to use it
- Type your regular expression pattern.
- Paste the text you want to test it against.
- Review the highlighted matches and adjust flags.
Frequently asked questions
What is a regular expression?
A regular expression (regex) is a compact pattern for matching text — used to search, validate and extract strings like emails, phone numbers or dates.
What do the g, i and m flags mean?
g (global) finds all matches instead of stopping at the first, i (insensitive) ignores letter case, and m (multiline) makes ^ and $ match at each line break.
How do I match an email or a number?
Use character classes: \d+ matches one or more digits, and a simple email pattern is \S+@\S+\.\S+. Test and refine it here until it fits your data.
What does Regex tester do?
Test a regular expression and see what it does: matches highlighted in the text, every capture group listed, a replace panel, and the pattern read back to you piece by piece. Flags are toggles that say what they change, and a pattern that could freeze the page is flagged before you run it.
What does it take into account?
It factors in matches highlighted in the text, every capture group listed, a replace panel, and the pattern read back to you piece by piece. Flags are toggles that say what they change, and a pattern that could freeze the page is flagged before you run it. Change any of them and the output follows immediately.
When would I actually use this?
Getting usable data out of something that was never meant to be parsed: pulling every address out of a pasted thread, turning a column of lines into a JSON array or an SQL IN clause, renaming a hundred identifiers from snake_case to camelCase in one pass.
What is the most common mistake?
Trusting an extraction to be exhaustive. A pattern that catches every address in the sample will still miss the one wrapped across a line break, the one written with a display name, and the one an email client turned into a link — count what came out against what you expected before you use the list.
What else is filed next to it?
ASCII code converter, Number base converter and Programming case converter share its section. They are not variants of it — being filed together is not the same as being alike — but that is where to look if this turned out not to be the tool you wanted.
Where do the figures come from?
Extraction runs on patterns, not on a parser: it recognises the common shapes of an address, a URL or an IP rather than validating them against their specification. That is the right trade for a paste, and the wrong one for input you are about to store.