Everyday tools

Test a regular expression against real text

Type a pattern and some text, see every match highlighted as you type. Everything runs in your browser — nothing is uploaded.

1
Enter a pattern
//g
2
Test text
2 matches
Contact us at [email protected] or [email protected] for help.

Common questions

Which regex flavour does this use?
JavaScript’s native regular expression engine, the same one used in any browser or Node.js project — patterns should behave the same way here as they would in real code.
What do the different flags do?
g finds every match instead of stopping at the first one, i ignores uppercase/lowercase, m changes how ^ and $ behave across multiple lines, and s lets a dot match line breaks too.
Why does my pattern show an error?
The pattern is not valid regular expression syntax as written — a common cause is an unescaped special character like ( or . that needs a backslash in front of it to be treated literally.