Regex tester
Test a regular expression against sample text. Matches highlight live as you type. Runs locally in your browser — nothing is sent anywhere.
Test a regular expression against sample text. Matches highlight live as you type. Runs locally in your browser — nothing is sent anywhere.
A few patterns people search for most often. Click "Try it" to load one into the tester above.
| Pattern | Matches | |
|---|---|---|
| [a-z]+@[a-z]+\.[a-z]{2,} | Simple email address | Try it → |
| ^\d{1,3}(\.\d{1,3}){3}$ | IPv4 address | Try it → |
| https?:\/\/[^\s]+ | URL starting with http/https | Try it → |
| \+?\d[\d\-\s]{7,}\d | Phone number, loosely | Try it → |
g finds all matches instead of stopping at the first. i makes matching case-insensitive. m makes ^ and $ match the start/end of each line instead of the whole string.
Yes — this tool uses the browser's native RegExp engine, so patterns behave exactly as they would in JavaScript code (PCRE and Python's re module differ slightly).
Yes, paste multiline text into the test string box. Add the m flag if you want ^ and $ to match line boundaries rather than the whole string.
No. Matching runs locally in your browser using JavaScript's built-in regex engine — nothing is uploaded.
Monitor your websites, servers, and APIs from one dashboard. 10 monitors free, no card required.