Regex Tester
Test regular expressions with live highlighting, a capture-group table, replace preview and a cheatsheet.
Runs entirely in your browser — nothing is uploadedTest string
Matches highlighted
Cheatsheet
\dany digit\wword char [A-Za-z0-9_]\swhitespace.any char (except newline)^ $start / end\bword boundary*0 or more+1 or more?0 or 1 (or lazy){2,5}between 2 and 5(…)capture group(?:…)non-capturing(?<name>…)named group(?=…)lookahead(?<=…)lookbehind[abc]character set[^abc]negated seta|balternationAbout the Regex Tester
Write a regular expression and watch it match against your test text as you type. Every match is highlighted in place, and a table below breaks out each match with its index, its captured groups, and any named groups.
The replace preview shows the result of a substitution live, with support for $1-style backreferences and $<name> named references — so you can get a complex replacement right before running it against real files.
All JavaScript flags are exposed: global, case-insensitive, multiline, dotAll, unicode and sticky. A built-in cheatsheet covers the syntax people look up most often — lookahead and lookbehind, quantifier greediness, character classes and anchors.
A common practical use is validating a pattern before dropping it into a grep, an Airflow sensor, a log parser or a data-quality rule, where getting it wrong is expensive to discover later.
Everything runs inside your browser using standard web APIs. Your data is never uploaded, never stored on a server, and never leaves your device — you can confirm that by opening your browser devtools Network tab, or by switching off your Wi-Fi and using the tool offline.
Frequently asked questions
Which regex flavour does this use?
JavaScript (ECMAScript) regular expressions, since it runs in your browser. Syntax is very close to PCRE for everyday patterns, but there are differences — notably in lookbehind support and some Unicode property escapes — so verify anything you intend to run in Python or Java.
Why does my pattern hang the page?
Almost certainly catastrophic backtracking, usually from nested quantifiers like (a+)+ against a long non-matching string. The tool runs matching with a time guard and warns you rather than freezing indefinitely.
What is the difference between greedy and lazy quantifiers?
Greedy quantifiers such as .* match as much as possible then give back; lazy ones such as .*? match as little as possible. When extracting content between delimiters, lazy is usually what you want.
Can I test multiline patterns?
Yes. Enable the m flag to make ^ and $ match at line boundaries, and the s flag to let . match newline characters.