Back to Tools

Regex Tester

Test a regular expression against sample text, with matches highlighted live.

/ /

About this tool

Tests a regular expression against sample text with matches highlighted live as you type the pattern — using your browser's native regex engine, so behavior matches what your actual JavaScript code will do.

Frequently asked questions

Which regex flavor does this use?

JavaScript's native RegExp engine — the same one your browser or Node.js uses. Most syntax is shared with other regex flavors (PCRE, Python's re), but some features differ, so double-check flavor-specific syntax if you're writing the pattern for a different language.

Why do I need the "g" flag for this tool to highlight all matches?

Without the global flag, a regex only reports its first match. This tool applies it automatically even if you don't type it, specifically so every match gets highlighted rather than just the first one.