Test JavaScript regular expressions online with live match highlighting, colored capture groups and replacement preview. Get a plain-language explanation of the pattern and copy it for Python, Java, C#, PHP or Go.
/
/
Matches will appear here
The replacement preview will appear here
Enter an expression to get started
JavaScript engine · 800 ms execution limit
Frequently asked questions
How do I test a regular expression?
Write the pattern, choose the flags and paste your text. Matches are highlighted as you type, each capture group gets its own color, and the list shows every group value.
Can I use the regex in Python, Java or C#?
Yes. Use “Copy as” to get ready-to-paste code for JavaScript, Python, Java, C#, PHP or Go, with the flags and named groups adapted to each language.
Is my text sent to a server?
No. The expression is evaluated in your browser, so the text you test never leaves your device.