How to test a regular expression
- 1
Type your regular expression and choose its flags, like g for global or i for ignore case.
- 2
Paste the text to test it on.
- 3
Matches and groups are highlighted as you type, so you can adjust the pattern.
Questions
Which regex flavor does this use?
JavaScript's. Most syntax is the same in other languages, but lookbehind, named groups and some flags can differ.
Why does my pattern only match once?
Without the g (global) flag, a JavaScript regex stops at the first match. Turn on g to find all of them.
Is my data uploaded anywhere?
No. This tool runs entirely in your browser, so what you paste never leaves your device.