Test regular expressions live - highlight matches, inspect capture groups and preview replacements. Runs in your browser.
| # | Match | Groups | Index |
|---|
A regular expression (regex) is a pattern used to search and manipulate text. This tester lets you build a pattern, toggle flags, and instantly see what it matches in your sample text, inspect the capture groups, and preview a find-and-replace - all evaluated locally in your browser using JavaScript's RegExp engine.
$1, $2, $&) to preview the result.g, i, m, s, u, y.$1, $2 and $& syntax.Validating emails, slugs or phone formats before the pattern goes into code; pulling fields out of log lines; drafting a find-and-replace for a bulk edit; or simply learning how a tricky pattern behaves against real sample text before you trust it. Building the pattern here first saves a round-trip through your editor and test suite.
No. The pattern and test string are evaluated entirely in your browser with JavaScript's RegExp engine, so nothing is uploaded or stored.
JavaScript's RegExp, which follows the ECMAScript standard. Most common patterns work as-is, but a few features such as lookbehind or named groups depend on your browser version.
g matches all occurrences, i ignores case, m makes ^ and $ match each line, s lets the dot match newlines, u enables full Unicode, and y anchors at lastIndex (sticky).
Reference them with $1, $2 and so on, and use $& to insert the whole match. The Result box previews the replacement live as you type.