Write me a regular expression to validate email addresses.
- User
Write me a regular expression to validate email addresses.
Assistant
A regular expression to validate email addresses should match the following pattern:
- Start with
^to indicate the start of the string. - Match one or more ASCII letters or digits, or one of these symbols:
!#$%&'*+/=?^_{|}~` (this is known as the "local part" of the email address). - Optionally include an
@symbol. - Followed by one or more ASCII letters or digits, or one of these symbols:
.+-(this is the "domain part" of the email address). - Optionally include a
.followed by one or more of the same characters as allowed in the domain part.
- Start with
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.