Regex Tester
Tests regular expression matches live, so you can verify as you write.
Test regular expressions online with live match results — JavaScript flavor, toggle flags and capture groups instantly.
Steps and notes
What is Regex Tester — JavaScript Regex Tester Online?
Regular expressions fail silently: a pattern that looks right may be matching the wrong thing. A live tester closes the gap between writing a pattern and trusting it — paste the real text you need to parse, and every match, capture group and flag effect is highlighted as you type.
- Write the pattern in the top field (without the surrounding slashes)
- Enter the text to match in the bottom field
- Review the highlighted matches and capture groups
- Add the g flag for global matching, otherwise only the first match is reported
Frequently asked questions
- Which regex flavor does this use?
- JavaScript (ECMAScript). Everyday syntax is shared with PCRE and Python, but lookbehind, named groups and unicode handling differ between engines — keep the rules of your target language in mind when testing.
- What do the flags mean?
- g returns all matches instead of stopping at the first one; i ignores case; m makes ^ and $ match line boundaries; s lets the dot match newlines.
- Is my text sent anywhere?
- No. Matching runs entirely in your browser — nothing you paste ever leaves the page.
- How do I test a regex with capture groups?
- Write the groups into your pattern (e.g. (\d+)-(\d+)), run it against your text, and each match lists its capture groups with their values — so you can verify not only that the pattern matches, but that the right parts land in the right groups.
- Why does my regex work here but fail in my program?
- Usually a flavor or escaping difference: languages disagree on lookbehind, named groups and unicode classes, and string literals often eat a backslash before the regex engine sees it. Test with the same escaping your program uses.
Category: Development
Regex tools workflow
Regex Tester — JavaScript Regex Tester Online → Regex Cheat Sheet — Complete Regular Expression Reference