Regex Tester & Builder
Test and debug regular expressions live with match highlighting, capture groups, flags, and a handy cheat sheet. 100% in-browser.
Regex cheat sheet
\d digit \w word char \s whitespace . any char^ start $ end \b word boundary* 0+ + 1+ ? 0 or 1 {2,5} range[abc] set [^abc] negated (a|b) alternation(...) capture group (?:...) non-capturing (?<name>...) named
About the Regex Tester & Builder
Write, test, and debug regular expressions in real time with match highlighting and capture-group inspection — all in your browser.
What this tool does
Enter a regular expression and a test string and see matches highlighted instantly, along with the values of every capture group. Toggle the common flags (global, ignore case, multiline, dotall, unicode) and the results update live. Nothing is sent to a server.
Why it matters
Regex powers validation, search-and-replace, log parsing, redirects, and scraping. Getting a pattern right by trial and error in code is slow; testing it here first saves time and prevents bugs.
- Validate emails, URLs, slugs, phone numbers and more.
- Debug why a pattern matches too much or too little.
- Inspect capture groups and named groups at a glance.
- Learn regex faster with the built-in cheat sheet.
Tips
Use the flags to control behavior:
- g finds all matches instead of just the first.
- i makes the pattern case-insensitive.
- m makes ^ and $ match line starts/ends.
- s lets the dot match newline characters.
FAQ
Which regex flavor is used?
Is my data uploaded?
Does it support named capture groups?
Why does my pattern cause an error?
Related tools
Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.