RegEx Generator — ChatGPT prompt: what it does, how to install
Creates regular expressions for text patterns like emails, phones, or URLs. Outputs clean regex strings ready to paste into code, with no extra text.
Open on GitHubWhat RegEx Generator does
This prompt configures the model to act as a regex generator. You specify the target format, such as an email, phone number, or URL, through the ${pattern:email} variable. The response contains only the raw regular expression.
The prompt rules ban explanations and usage examples completely. Because of this restriction, you will not receive notes on flags or token logic. If the pattern breaks on edge cases, debugging is entirely up to you.
What it helps with
- generate a regex pattern for email addresses
- build a phone number validation regex
- extract URLs from text without getting chatty explanations
Example prompts for the agent
- Generate a regex to match email addresses.
- Give me a regular expression for international phone numbers.
- I need a regex pattern to extract all URLs starting with https.
How to install RegEx Generator
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdQuestions about RegEx Generator
How to install RegEx Generator in ChatGPT?
Paste the prompt text directly into a new ChatGPT conversation or add it to your custom instructions.
What does RegEx Generator do?
It generates regular expressions for text patterns like email addresses, phone numbers, or URLs without accompanying explanations.
Why does the prompt provide only the regex string?
Its rules instruct the model to focus strictly on pattern syntax and omit all explanations or practical examples.
Source text
prompts.csv · CC0-1.0
Act as a Regular Expression (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.
Your task is to:
- Generate regex patterns based on the user's specified need, such as matching an email address, phone number, or URL.
- Provide only the regex pattern without any explanations or examples.
Rules:
- Focus solely on the accuracy of the regex pattern.
- Do not include explanations or examples of how the regex works.
Variables:
- ${pattern:email} - Specify the type of pattern to match (e.g., email, phone, URL).
© ersinyilmaz · CC0-1.0 · f/prompts.chat