fixaiprompt
All templates
💻 Coding·Works on: claude, chatgpt, cursor

Regex Generator

Get a regex with explanation, edge cases, and a test plan.

#regex#validation
0/2
Fill the template
2 placeholders left.
Live preview
Generate a regex that matches: .

Deliver:
1. The regex, in  syntax.
2. A one-line plain-English description.
3. A breakdown of each group/character class.
4. 5 strings that should match.
5. 5 strings that look similar but should NOT match (and why).

If my requirement is ambiguous, list the ambiguities before giving the regex.
Inputs0 of 2
e.g. "US phone numbers in (xxx) xxx-xxxx format only"
See the lazy version this template replaces
Before — the lazy prompt
give me a regex for emails

Why it works

  • Forces the model to enumerate edge cases — most regex bugs live in the 'should NOT match' set.
  • Explicit flavor avoids subtle regex-engine differences.
  • The breakdown teaches you, not just solves the problem.

Make this one yours

Replace the bracketed placeholders, then paste into the Prompt Fixer to lint your customisation before hitting send.