6 min read
2026-02-20
Checking email format is one of the most common tasks. The basic pattern covers most cases.
Regular expressions allow you to extract IP addresses, timestamps, response codes and request URLs from logs.
Renaming variables
Changing the format of imports
Update legacy API calls
Although it is better to use specialized libraries for HTML parsing, regex is suitable for simple tasks.
| Problem | Pattern |
|---|---|
| Phone | `\\+7\\d{10}` |
| Postal code | `\\d{6}` |
| URL | `https?://[\\w.-]+` |
| Date | `\\d{2}\\.\\d{2}\\.\\d{4}` |
Regex helps parse CSV strings by taking into account quotes and escaping.
See also: HTML Formatter, Diff Checker, JSON Formatter