We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The regex pattern ^[a-z][\w\-.]*@[a-z]+\.[a-z]{1,3}$ is used to validate email addresses. It requires that the username portion of the email address starts with an English alphabetical character and can contain any number of alphanumeric characters, hyphens (-), periods (.), and underscores (_). The domain and extension portions of the email address must contain only English alphabetical characters, and the extension must be 1, 2, or 3 characters in length.
Validating and Parsing Email Addresses
You are viewing a single comment's thread. Return to all comments →
The regex pattern
^[a-z][\w\-.]*@[a-z]+\.[a-z]{1,3}$
is used to validate email addresses. It requires that the username portion of the email address starts with an English alphabetical character and can contain any number of alphanumeric characters, hyphens (-), periods (.), and underscores (_). The domain and extension portions of the email address must contain only English alphabetical characters, and the extension must be 1, 2, or 3 characters in length.