Regex Tester
Test regular expressions, with matches highlighted.
Matches
Result
Match details
| # | Index | Match | Groups |
|---|
Thanks.Tell us why
Runs on your device. Nothing to upload.
Questions
Which regex flavor is this?
JavaScript (ECMAScript), as used in browsers and Node.js, including named groups (?<name>…), lookbehind and Unicode property escapes like \p{L} with the Unicode flag. Other languages (PCRE, Python, Java) are very similar but differ in details.
Why was my pattern stopped?
Some patterns, especially nested repeats like (a+)+, can take an astronomically long time on text that almost matches (“catastrophic backtracking”). The tool stops any pattern that runs longer than 1.5 seconds so the page stays responsive. Safari gives up on such patterns by itself after about a second and reports no match, so the tool warns you when a result may be incomplete. Rewrite the pattern so that repeats can’t overlap.
How do replacements work?
Type a replacement to see the result. Use $1, $2… for numbered groups, $<name> for named groups and $& for the whole match. Without the Global flag only the first match is replaced.
Is it free? Do I need an account?
It is free to use and there is nothing to sign up for. There are no watermarks and no daily limits.
Missing something, or not working as it should? Tell us