Cheat sheet
. any char \d digit \w word char \s whitespace
^ start $ end \b word boundary
* 0+ + 1+ ? 0 or 1 {2,5} 2 to 5
[abc] any of [^abc] none of (x) group (?:x) non-capture (?<name>x) named
a|b a or b (?=x) lookahead (?!x) negative lookahead
Flags: g global · i ignore case · m multiline · s dotall · u unicode · y stickyAbout the Regex Tester
Write a JavaScript regular expression, set flags and see every match and capture group highlighted live in your test text.
How to use it
- Enter your pattern and flags.
- Paste test text — matches highlight as you type.
- Optionally add a replacement to preview the result.
- Free, no sign-up
- Runs in your browser — private
- Works on mobile and desktop
Frequently asked questions
Is the Regex Tester free?
Yes. The Regex Tester is completely free to use, with no sign-up or usage limits beyond fair-use protection.
Is my data private?
This tool runs entirely in your browser — nothing you enter is uploaded or stored on our servers.