Free Regex Tester (JavaScript)
Something not working? Report a problem
About the Regex Tester
Test regular expressions against sample text with live match highlighting, capture groups and flags — JavaScript flavour, running entirely in your browser.
How to use the Regex Tester
- 1Type your regular expression and pick its flags.
- 2Paste the text you want to test it against.
- 3Matches highlight live in the text, with every match and its capture groups listed below.
- 4Adjust the pattern until it matches exactly what you want.
Frequently asked questions
Which regex flavour is this?
JavaScript (ECMAScript) — exactly what runs in Node.js and browsers. Most patterns work the same in other languages, but some syntax (like lookbehind or \p{…}) varies, so always test in your target language too.
What do the flags mean?
g finds all matches instead of stopping at the first; i ignores case; m makes ^ and $ match at every line; s lets . match newlines too.
Is my text or pattern uploaded?
No — matching runs entirely in your browser, so it's safe to test against logs or data containing real information.
Why does my pattern match nothing?
The usual suspects: special characters like . + ? ( ) that need escaping with a backslash, or a pattern anchored with ^ or $ that doesn't account for the whole line. Build it up piece by piece and watch the highlighting.
What are capture groups?
Parentheses capture parts of a match — (\d{4}) in a date pattern captures just the year. Groups are numbered left to right, and named groups like (?<year>\d{4}) show up with their name.