Regex Tester
Test regular expressions live with highlighted matches, capture groups, and replace mode. Supports all JS regex flags. Free, instant, runs in your browser.
How It Works
Using Regex Tester in 3 Steps
Write Your Pattern
Type a regular expression in the pattern box. The tester compiles it instantly and shows any syntax errors right below.
Toggle Flags & Add Test Text
Click flag chips to enable g, i, m, s, u, or y. Paste sample text and watch matches highlight live as you adjust the pattern.
Test Replace & Capture Groups
Enable Replace mode to preview substitutions with $1, $2 group references. Expand Match details to inspect every match's index and captures.
Use Cases
Who Uses Regex Tester?
Frontend & Backend Developers
Build form-field validators, parse log lines, and craft URL routing patterns confidently before pasting into your codebase.
Data & Content Teams
Find-and-replace across text content, extract data from semi-structured strings, and clean up imported CSV or JSON values.
QA & Site Reliability Engineers
Write log-search filters and alert patterns, and verify they match real production samples without deploying to test.
FAQ
Regex Tester — Frequently Asked Questions
Everything you need to know before you start.
Which regex flavour does this tester use?
JavaScript / ECMAScript regex — the same engine used in browsers and Node.js. Most patterns from PCRE, Python, and Ruby work, but some advanced features (e.g., lookbehind in older engines, possessive quantifiers, named recursion) may differ.
What does each flag do?
g = find all matches, i = case-insensitive, m = ^ and $ match at line breaks, s = dot matches newlines, u = full Unicode matching, y = sticky matching from lastIndex.
How do capture groups work in replace mode?
Use $1, $2, etc. in the replacement string to reference parenthesised groups in the pattern. For named groups (?<name>...), use $<name>. Use $$ for a literal dollar sign.
Is my regex pattern stored or sent to a server?
No. The tester runs entirely in your browser. Nothing is logged, sent, or stored.
More Free Tools