Instant, zero-lag matching
Results update as you type with no build step, no loading spinner and no server round-trip. Even long test strings stay responsive.
Write a pattern, paste your text and see every match highlighted instantly. This regex tester shows capture groups, named groups, live replace output, a plain-English explanation of your expression and ready-to-paste code for JavaScript, Python, PHP, Java, C# and Go.
Most online regular expression testers either bury the result in a cluttered IDE-style layout or give you a bare input box with no feedback. This one is built around a single question: does my pattern do what I think it does?
Results update as you type with no build step, no loading spinner and no server round-trip. Even long test strings stay responsive.
See the match number, character index, full match, numbered capture groups and named groups in one readable list instead of a cramped tooltip.
The Explain tab breaks your expression into tokens and tells you what each piece actually does, so you learn the syntax while you debug it.
Test a search-and-replace with backreferences and see the rewritten text before you run it against real data.
Export your finished pattern as a working snippet for JavaScript, Python, PHP, Java, C# or Go with the escaping already handled.
Your pattern and text never leave the browser, and the whole tool is usable one-handed on a phone — something most regex sites still get wrong.
Type the expression between the slashes, or pick a ready-made pattern such as email, URL, IPv4 or date from the dropdown to start from a working example.
Toggle g, i, m, s, u and y. Most bugs come from a missing global or multiline flag, so try switching them if a match is missing.
Drop in real sample data — a log line, a CSV row, an HTML snippet. The highlighted panel marks each match in alternating colours so adjacent matches stay readable.
Open the Matches tab to confirm the index and captured groups. Use Explain if a token is behaving unexpectedly.
Switch to Replace, use $1 or $<name> to reference groups, and confirm the output before using it in your editor or script.
Open the Code tab, pick your language and paste the generated snippet straight into your project.
The tokens people look up most often, in one place. Everything below works in the tester above.
.Any character except a newline (unless the s flag is on)\d \w \sDigit, word character, whitespace\D \W \SThe negated versions of the above[abc]Any one of a, b or c[^abc]Any character except a, b or c[a-z0-9]Character ranges inside a class*Zero or more of the previous token+One or more?Optional, or lazy after another quantifier{2,5}Between two and five repetitions^ $Start and end of the string, or of a line with m\bWord boundary(abc)Capture group, referenced later as $1(?:abc)Group without capturing(?<name>abc)Named capture groupa|bAlternation: a or b(?=abc)Positive lookahead(?!abc)Negative lookahead(?<=abc)Positive lookbehind\. \/ \$Escape a character that would otherwise be specialA regex tester is a tool that runs a regular expression against sample text and shows you exactly what it matches. Instead of guessing why a pattern fails inside your code, you see the matches, their positions and their capture groups immediately, then paste the finished expression into your project.
It is completely free with no account and no usage limit. Every match is calculated by JavaScript inside your own browser, so your pattern and your test string are never uploaded, logged or stored anywhere. That makes it safe for production logs, customer data and anything else you would not paste into a random website.
It uses the JavaScript (ECMAScript) engine, which covers the vast majority of everyday patterns and behaves identically to Node.js and browser code. Most expressions also transfer directly to PCRE flavours such as PHP, Python and Java. The main differences to watch for are possessive quantifiers, atomic groups and recursion, which PCRE supports and JavaScript does not.
g finds every match instead of stopping at the first. i makes matching case-insensitive. m lets ^ and $ match at the start and end of each line. s allows the dot to match newline characters. u enables full Unicode handling, which you need for emoji and non-Latin scripts. y makes matching sticky, so it only succeeds at the current position.
The usual causes are a missing g flag, an unescaped special character such as a dot or a slash, a greedy quantifier swallowing more than you expected, or a case mismatch that the i flag would fix. Anchors are the other frequent culprit: ^ and $ only match line boundaries when the m flag is enabled. Toggle the flags above and check the Explain tab to see how each token is being read.
Anything wrapped in parentheses is captured and numbered from left to right, so the first pair of brackets becomes group 1. Use (?:…) when you want to group tokens without capturing them, and (?<year>…) to give a group a readable name. Every group found is listed under its match in the Matches tab, and you can reference them in a replacement as $1 or $<year>.
Yes. Open the Replace tab, type your replacement text and use $1, $2 or $<name> to insert captured groups, or $& for the whole match. The rewritten text appears instantly so you can confirm the result before running the same expression in your editor, database migration or build script.
Yes. The layout is mobile-first, the panels stack on small screens, the pattern field disables autocorrect and autocapitalisation so your syntax stays intact, and every control is large enough to tap comfortably. It also works offline once the page has loaded, because nothing depends on a server.
Paste your expression, watch every match light up and copy working code in the language you actually ship. No sign-up, no limits, nothing leaves your browser.