Regex Tester
How to test a regular expression
- Type the pattern without slashes, and the flags, such as g for all matches and i to ignore case.
- Paste the text to search. Matches are highlighted, and each match and capture group is listed below.
- Type a replacement to preview it. Use $1, $2 for groups and $<name> for named groups.
Frequently asked questions
Which regex flavor is this?
JavaScript's, as in modern browsers and Node.js, including named groups, lookbehind and the u, s, d and v flags. Most patterns work the same in Python, PHP and Java, but some syntax, such as possessive quantifiers, differs.
Why is only one match shown?
Without the g flag, a regex stops at the first match. Add g to find them all.
Is my text sent anywhere?
No. The text is processed inside your browser and is never sent anywhere.