Test and debug your regular expressions with real-time highlighting and explanation
The results will show whether there's a match, highlight all matches in the test string, and list each match with its position.
Regular expressions (regex) are sequences of characters that define a search pattern. They are widely used for string matching and manipulation in programming, text editors, and command-line utilities.
^
- Matches the beginning of a string$
- Matches the end of a string.
- Matches any single character except newline*
- Matches 0 or more occurrences of the preceding element+
- Matches 1 or more occurrences of the preceding element?
- Matches 0 or 1 occurrence of the preceding element\d
- Matches any digit (0-9)\w
- Matches any word character (a-z, A-Z, 0-9, _)\s
- Matches any whitespace character[abc]
- Matches any one of the characters a, b, or c[^abc]
- Matches any character except a, b, or c(x|y)
- Matches either x or y^[\w.-]+@[\w.-]+\.\w+$
^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$
^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$
^(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])\/\d{4}$
^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$
(at least 8 characters, one letter and one number)