Free tools & games for everyone
Free · No sign-up · No accounts
Test a regular expression on your own text: see every match and group, preview replacements, and read what each part of the pattern means.
| # | Position | Match | Groups |
|---|
Result:
As JavaScript:
$1 is group 1, $<name> a named group, $& the whole match.| Tab | Move between the pattern, flags, text and replacement |
|---|---|
| Space | Tick or untick a flag |
| Enter | Run the pattern again (in the pattern box) |
\. is a real full stop, . is any character..* is greedy and grabs as much as it can; .*? takes as little as possible.(?:…) when you only need grouping, and (?<name>…) to give a group a readable name.(a+)+ can take forever on text that almost matches. The tester stops after 2 seconds and tells you.Patterns run in your browser's own JavaScript regular expression engine, so the results are exactly what JavaScript code would get. Other languages (Python, PCRE, Java) agree on most basics but differ in some details, such as look-behind and named groups.
Matching runs in a background worker, so a slow pattern cannot freeze the page. Up to 1,000 matches are found and the first 200 are listed. The explanation is our own token-by-token reading of the pattern.
Nothing is stored or sent: your pattern and text stay on your device.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product