New

2,000+ fresh prompts added this week — grab the latest bundle for $47.99

Regex builder and explainer

Build a regular expression from examples, then get it explained piece by piece with the edge cases.

Recommended Tools

PROMPT

What this prompt does

  • Builds the expression from your real examples and counter-examples.
  • Explains every component so the expression is maintainable by someone else.
  • Supplies inputs that break it, which is where most regex bugs come from.

Tips for this prompt

  • Counter-examples matter more than examples. Give it the strings that must not match.
  • Always name the flavour – escaping rules differ enough to matter.
  • Take the simpler version seriously if this will live in code someone else maintains.

How to use the prompt

  • Copy the prompt and replace everything in curly braces with your own details.
  • Paste it into your AI tool of choice and send.
  • Ask a follow-up if you want the output in a different format.

Related prompts

  • Starter

Rejections that are kind, specific enough to be useful, and safe to send at volume.

Read prompt
  • Pro

Generate reference documentation from source, including the errors and edge cases the code implies.

Read prompt
  • Starter

A reply that lowers the temperature, owns what is ours, and offers a concrete next step.

Read prompt
  • Free

Write first lines that prove you actually looked, from a prospect page or profile you paste in.

Read prompt