Match, substitute, list, and unit-test regular expressions with live highlighting, a plain-English breakdown, and a full cheat sheet β all in your browser.
βοΈ Live testing always runs on your browser's JavaScript (ECMAScript) regex engine. Flavor only changes the reference notes and exported code below β actual behavior in PHP/Python/Go/etc. may differ for advanced constructs.
Click to load a ready-made pattern into the tester.
No matches yet β type a pattern and some test text above.
Uses JS replacement syntax: $1β¦$9 numbered groups, $<name> named groups, $& whole match, $$ literal dollar sign.
Uses the same test string and pattern as the Match tab.
| # | Match | Index | Length | Groups |
|---|---|---|---|---|
| No matches yet. | ||||
One per line: input || true (should match) or input || false (should not match).
| Status | Input | Expected | Actual |
|---|---|---|---|
| Run tests to see results. | |||
Enter a pattern above to see a token-by-token breakdown.
Your pattern and flags formatted for the selected Flavor.
/(?:)/ Saved only on this device β never uploaded anywhere.
$1, $<name>, $&, or $$.input || true/false lines and instantly see which ones pass or fail against your pattern.A regular expression describes a search pattern instead of exact text β \d+ matches one or more digits, like 42, 2026, or 123456789.
| Token | Description |
|---|---|
. | Any character except a newline (unless the s flag is on). |
\d | Any digit (0β9). |
\w | Letters, digits, and underscore. |
\s | Any whitespace character. |
* | Zero or more of the preceding token. |
+ | One or more of the preceding token. |
? | Zero or one β makes the preceding token optional. |
[...] | Any one character from the set inside the brackets. |
(...) | A capturing group. |
^ / $ | Start / end of the string (or line, with the m flag). |
Emails, usernames, phone numbers, ZIP/postal codes, and passwords before submission.
Parsing config files, processing API responses, refactoring code, cleaning datasets.
Extracting values from reports, logs, CSVs, and documents with structured patterns.
^/$ when validating a whole string.. or (.*?, +?) was intended.^/$.No. Most languages share a common core but differ on advanced features like lookbehind, named groups, Unicode property escapes, and possessive quantifiers. The Flavor selector adjusts reference notes and the code snippet for the language you pick.
Matching always runs on your browser's built-in JavaScript (ECMAScript) engine, regardless of the Flavor selected. There's no way to run a real PHP, Python, or Go engine inside a browser, so advanced-construct behavior may differ slightly.
Yes. Switch to the Substitution tab, type a replacement using $1, $<name>, $&, or $$, and see the result live.
Yes. The live plain-English explanation breaks your pattern into tokens with descriptions, and the cheat sheet plus full reference section cover every construct with examples.
No. All matching, substitution, and explanation happens locally in your browser. Nothing you type is sent to or stored on our servers.
g finds all matches. i ignores case. m makes ^/$ match line boundaries. s lets . match newlines. u enables full Unicode mode. y anchors matching to the exact lastIndex position.
It runs a heuristic check for common risky shapes like nested quantifiers, e.g. (a+)+ or (.*)*, and shows a warning. It can't catch every case β always test risky patterns against realistic worst-case input.
Paste a list of test cases, one per line, as input || true or input || false, and the tool checks whether your pattern matches or doesn't match each one as expected.
Yes. The Match List tab has buttons to copy all matches or download them as JSON or CSV.
Yes. The Code Export panel formats your current pattern and flags as a literal for JavaScript, Python, PHP, Java, Go, Rust, C#, C++, Ruby, Perl, and Scala.
All tools are free. If they've saved you time, consider supporting us.