Regex Tester
Test JavaScript regular expressions with live match highlighting.
- Runs in your browser
- Text
//g
Ping ana@example.com, raj.k@devfolio.in or support@acme.io. Not an email: hello@
| # | Match | <user> | <domain> |
|---|---|---|---|
| 1 | ana@example.com | ana | example.com |
| 2 | raj.k@devfolio.in | raj.k | devfolio.in |
| 3 | support@acme.io | support | acme.io |
How to use the Regex Tester
- 1Type a pattern between the slashes, then toggle flags such as g, i and m.
- 2Edit the test string. Matches are highlighted live.
- 3Use the snippet chips to insert common tokens, and check the capture groups table.
Questions
Which regex flavor is this?
JavaScript (ECMAScript), as used in browsers and Node.js. Named groups and lookbehind work, and you can toggle the g, i, m, s, u and y flags.
Why does my pattern match empty strings?
Patterns like a* can match zero characters. Those show as thin markers. Use + instead of * if you need at least one character.
How do named groups work?
Write (?<name>...). The table then labels that column with the name instead of $1.