Regex Tester

Test JavaScript regular expressions live. Every match and capture group updates as you type. Works entirely in your browser.

No pattern yet

Regex tester FAQ

Which regex flavor does this tester use?
JavaScript (ECMAScript) regular expressions - the same engine as in browsers, Node.js and most front-end code. If you test here, the pattern behaves the same way in JS. Python, PHP and grep have small differences in syntax and flags.
What do the g, i, m and s flags do?
g (global) finds every match instead of only the first. i (ignore case) makes matching case-insensitive. m (multiline) lets ^ and $ match at line breaks. s (dotAll) lets the dot match newline characters.
Why does my regex work here but not in my code?
Usually escaping or flags. In a code string you must escape backslashes twice, and some engines default to different flag sets. Copy the exact pattern and flags shown here, then adapt the string escaping for your language.
Is my text uploaded anywhere?
No. Matching happens entirely in this tab with the browser's RegExp engine. Your pattern and text are never sent to a server, so it is safe to test strings containing tokens, keys or customer data.