10 min read
2026-03-07
Regular expressions (regex) are a powerful tool for searching and replacing text using patterns.
| Character | Meaning |
|---|---|
| . | Any character |
| \d | Digit (0-9) |
| \w | Letter, digit, _ |
| \s | Whitespace character |
| ^ | Start of line |
| $ | End of line |
| * | 0 or more repetitions |
| + | 1 or more repetitions |
| ? | 0 or 1 repetition |
`[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}`
`\+7[\s-]?\(?\d{3}\)?[\s-]?\d{3}[\s-]?\d{2}[\s-]?\d{2}`
`https?:\/\/[\w.-]+\.[a-z]{2,}[\/\w.-]*`
Test your expressions in the Regex Tester.
See also: JSON Formatter, Find and Replace