Skip to main content
prompt GP ChatGPT

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 GitHub

What 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

Questions 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

Similar prompts

All prompts for Programming languages →

From the same set91

The whole set →
Password Generator This prompt creates a complex password from length, letter case, number, and special-character settings. It works in ChatGPT and Claude.ai. GP ChatGPT ★ 174,676repo stars Software Quality Assurance Tester Turns a chat into a QA tester: checks functionality and performance, writes bug reports and suggests fixes. GP ChatGPT ★ 174,676repo stars StackOverflow Post A prompt that makes the model answer programming questions the way a Stack Overflow post would: straight to the point, with explanations only when you ask. GP ChatGPT ★ 174,676repo stars R Programming Interpreter Turns a chat into an R console stand-in: you send a command, the reply is terminal output in a single code block. Handy for checking syntax or a function's result without opening R. GP ChatGPT ★ 174,676repo stars Fullstack Software Developer A prompt that turns the chat into a developer: describe your web app requirements and get back an architecture plus code in Golang and Angular. GP ChatGPT ★ 174,676repo stars IT Expert This prompt turns a chat into an IT specialist: it diagnoses technical problems and walks through the fix step by step. Handy when you need to know what to do about an error. GP ChatGPT ★ 174,676repo stars Machine Learning Engineer A prompt that turns the chat into a machine learning engineer: it explains ML concepts in plain terms, walks through model building and points to further reading. GP ChatGPT ★ 174,676repo stars Python Interpreter Turns the model into a Python executor: you send code, it answers with the output alone. Handy when you want a clean result and no commentary. GP ChatGPT ★ 174,676repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor