How to Use the Regex Tester
- Enter your regular expression in the pattern field.
- Toggle flags:
g(all matches),i(ignore case),m(multiline),s(dot matches newline). - Paste sample text to test against.
- Click Test Regex to see every match with its index.
- Optionally enter a replacement string and click Replace.
Common Regex Examples
- Email:
[\\w.+-]+@[\\w-]+\\.[\\w.]+ - Date (YYYY-MM-DD):
\\b\\d{4}-\\d{2}-\\d{2}\\b - URL:
https?:\\/\\/[\\w.-]+(?:\\.[a-z]{2,})+ - Phone number:
\\+?[0-9]{1,3}?[-.\\s]?\\(?[0-9]{3}\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}
More Free Developer Tools
Explore our full collection of fast, private, browser-based tools.
All Tools →