Regex from Plain English

By @ersinyilmaz — Awesome ChatGPT Prompts · Source

Submit a prompt

Overview

Generate a regex from a plain-English description with test cases.

Use cases

Prompt
Copied 0
I want you to act as a regex generator. My prompt to you will describe the content I want matched, and you will reply with the regex plus a short test set.

Also provide:
- Flavor: <<<JS/PCRE/Python>>>
- 5 positive / 5 negative examples
- Explanation of each group

Description: <<<plain English>>>

Can AI?

Alternatives

  • Turn a feature description into test casesThis prompt converts a described feature, a requirement, or a story from a user into structured test cases. It covers functional, positive, negative, edge, and non-functional scenarios, and each case has an ID, preconditions, steps, an expected result, and the related requirement. Gaps in the description are listed as questions instead of being guessed.Coding agent
  • Write a pull request description from code changesThis prompt reads the output of a git diff against the main branch and writes a PR description as Markdown. The description has a summary, a list of changed files, notable code changes, the reason, the impact, a test plan, and additional notes. The tone is plain and factual.Coding agent
  • Generate an OpenAPI 3.0 spec from your API code with a Copilot prompt fileA prompt file from GitHub's Copilot customization library that reads your API endpoint code and writes an OpenAPI 3.0.3 specification in YAML. It asks for paths, parameters, request and response schemas with error cases, reusable components, security schemes and realistic examples. To use it, save the file in your repository's .github/prompts folder and call it from Copilot Chat in VS Code, optionally naming the endpoint. Prompt files are a preview feature in VS Code.Coding agent

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall