Regex Tester
Test regular expressions with live match highlighting, explanations, saved patterns, and a built-in cheat sheet.
No saved patterns yet.
About the Regex Tester
A free, browser-based regular expression tester with real-time match highlighting, group capture details, pattern explanations, a built-in cheat sheet, and saved patterns via localStorage. Nothing leaves your browser.
Every match is highlighted as you type, with index positions and capture groups shown inline.
Each token in your regex is broken down with a plain-English description so you can debug faster.
Save patterns you use regularly to localStorage. They persist across browser sessions.
One-click presets for common patterns: email, URL, IPv4, UUID, JWT, semver, dates, and more.
About the Regex Tester
Updated June 2026 · 100% client-side — your data never leaves your browser.
Regular expressions are a powerful pattern-matching language for searching, validating and extracting text. Bytewrench's regex tester lets you write a pattern, set flags, and see live matches highlighted against your sample text — with capture groups broken out so you can build and debug expressions quickly.
It uses the JavaScript regex engine, so what you test here behaves exactly as it will in your JavaScript and TypeScript code.
See also: Find & replace, Text diff checker
See every match highlighted in your test string the moment you edit the pattern.
Inspect numbered and named capture groups for each match.
Toggle global, case-insensitive, multiline and other flags interactively.
Patterns and test data stay in your browser.
Frequently asked questions
What regex flavor does this use — JavaScript or PCRE?
It uses the JavaScript (ECMAScript) engine, not PCRE. Most syntax is shared, but a few PCRE features differ: lookbehind support depends on the engine version, and possessive quantifiers and atomic groups aren't available. What you test here behaves exactly as it will in browsers and Node.js.
How do I match an email address with regex?
A practical pattern is [^\s@]+@[^\s@]+\.[^\s@]+ — one or more non-space, non-@ characters, an @, a domain, a dot and a TLD. No regex perfectly matches the full email spec, so for real validation pair a simple pattern like this with sending a confirmation message.
What is catastrophic backtracking?
It's when a pattern with nested or overlapping quantifiers (like (a+)+ ) forces the engine to try an exponential number of ways to match certain inputs, causing it to hang. Avoid it by making quantifiers more specific and not nesting them, or by anchoring the pattern.
What's the difference between capturing and non-capturing groups?
(...) is a capturing group whose matched text is stored and numbered so you can reference it ($1) or read it from the results. (?:...) is non-capturing — it groups for alternation or quantifiers without storing the match, which is slightly faster and keeps your group numbers tidy. Use (?<name>...) for named captures.
Is my test data private?
Yes. The pattern and sample text are processed entirely in your browser.