All AI prompts
Coding & Dev
Build & explain a regex from plain English
With test cases you can paste into a regex tester.
The prompt
I need a regex that matches: [DESCRIBE IN PLAIN ENGLISH]. Provide: (1) the pattern in JavaScript flavor, (2) a plain-English breakdown of every group, (3) 5 strings it should match, (4) 5 strings it must NOT match, (5) an equivalent Python-flavor pattern.
Paste it into ChatGPT, Claude, Gemini or Midjourney and replace anything in [SQUARE BRACKETS] with your own details.
Related prompts
More Coding & Dev prompts from the library.
- Coding & DevSQL query from plain EnglishIncludes schema questions and explains the plan.
- Coding & DevGenerate unit tests for any functionHappy path, edge cases, and failure modes.
- Coding & DevPerfect conventional commit messageFollows conventional-commits, with body and footer.
- Coding & DevExplain any code line-by-lineGreat for reading unfamiliar codebases.