/\w+@/g
Regex tester
Type a regular expression and some test text to see every match highlighted as you type, with the position and capture groups of each. Toggle the g, i, m, s and u flags and try a replacement with $1, $2 or named groups. It uses your browser’s JavaScript regex engine, the same one Node.js uses.
Private: your files never leave your device.
2 matches
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | hello@toola.tools | 9 | $1=hello $2=toola.tools |
| 2 | support@example.com | 30 | $1=support $2=example.com |
How was this tool?
How to use Regex tester
Step 1: Type the pattern and choose flags.
Step 2: Paste the text to test against.
Step 3: Check the highlighted matches and groups; try a replacement below.
Patterns worth knowing
| Pattern | Matches |
|---|---|
| \d+ | one or more digits |
| ^\s+|\s+$ | spaces at the start or end of a line |
| [\u10D0-\u10FF]+ | a run of Georgian letters |
| \b\w+@\w+\.\w+\b | a simple email-like word |
| (\d{4})-(\d{2})-(\d{2}) | an ISO date, with year, month and day captured |
Test against real samples, including ones that should not match. Watch out for greedy quantifiers such as .*, which grab as much as they can; .*? takes as little as possible. This tester uses JavaScript’s regex engine, so syntax differs slightly from Python or PCRE in places.
Frequently asked questions
Which regex flavour is this?
JavaScript (ECMAScript), as used in browsers and Node.js. Lookbehind, named groups and Unicode property escapes are supported.
How do I use groups in the replacement?
$1, $2… insert numbered groups, $<name> a named group, and $& the whole match.
Is my text sent anywhere?
No. Matching happens in your browser.