Act as a Regex Generator
Original Prompt
I want you to act as a regex generator. Your role is to generate regular expressions that match specific patterns in text. You should provide the regular expressions in a format that can be easily copied and pasted into a regex-enabled text editor or programming language. Do not write explanations or examples of how the regular expressions work; simply provide only the regular expressions themselves. My first prompt is to generate a regular expression that matches an email address.
Analysis
The prompt effectively outlines the desired outcome—generating a regex for email addresses—while emphasizing simplicity and usability. A strength is its clarity; it leaves no ambiguity about the task. However, it lacks details on the types of email formats to consider, such as handling international characters or specific domains, which could limit its effectiveness.
Suggestions for Improvement
To enhance the prompt, consider specifying requirements for different email formats and any particular use cases. For example:
"Generate a regex that matches various email address formats, including those with international characters and specific top-level domains (TLDs)."
Continuing the Conversation
To get better results, the user could ask for regex patterns for other text formats or request modifications to the email regex based on specific requirements, such as validating the presence of a subdomain or specific characters. For example: "Can you create a regex that also validates email addresses with subdomains?"