Server

Regex Tester

Test a JavaScript regular expression against sample text and see every match, its position, and its capture groups. Everything runs in your browser.

Testing regular expressions

Type a pattern and test text to see every match and capture group highlighted live. The tester uses the JavaScript regular expression engine, which is close to PCRE for common patterns but differs in some advanced features such as possessive quantifiers.

Frequently asked questions

Will a pattern behave the same in grep or Python?

Basic syntax is shared, but details differ: grep uses POSIX basic regex unless you pass -E or -P, and Python's re module has its own flags and named-group syntax. Test with the target tool before relying on edge cases.

Further reading

All Utilities tools →