Regex Tester

Test regular expressions against text, find matches, capture groups and replace text.

Example: \d+ matches one or more digits

Enter a pattern and test text.

Matches

Match details

No matches yet.

Replace

Regex cheat sheet
. Any character
\d Digit
\w Word character
\s Whitespace
+ One or more
* Zero or more
? Optional
^ Start of text/line
$ End of text/line
( ) Capture group
[ ] Character set
| OR

About this regex tester

This tool runs entirely in your browser using native engine, so nothing you type is ever sent to a server. Enter a pattern and some test text above to see matches highlighted live, inspect capture groups, or switch on replace mode to preview a substitution before you use it in your own code.

Frequently asked questions

Why isn't my pattern matching more than once?

Turn on the Global option. Without it, only the first match in the text is found.

Is any of my text or pattern uploaded?

No. Matching and replacing both happen locally in your browser.