Explain and Write a Regex From Plain English
Translate a plain-English matching requirement into a regex with line-by-line breakdown and edge cases.
§ The Prompt— ready to copy
regex-explain-write.prompt
I need a regex that matches: [PLAIN ENGLISH DESCRIPTION OF WHAT TO MATCH]. Examples that SHOULD match: [LIST]. Examples that SHOULD NOT match: [LIST]. Target flavor: [JAVASCRIPT/PYTHON/PCRE/POSIX]. Give me: (1) the regex, (2) a line-by-line breakdown of what each part does, (3) edge cases I should test, (4) a safer alternative if regex is overkill (e.g., parsing).
Replace anything in [BRACKETS] with your specifics before sending.
Best For — Roles
Use For — Tasks
§ Related Entries
You may also need
№ 012coding
Debug an Error Message Step-by-Step
Get a structured debugging plan: error explanation, ranked root causes, tests, and fixes.
For
claude·chatgpt
№ 025coding
Build and Explain a Regular Expression
Get a working regex with a plain-English breakdown and a set of passing/failing test cases.
For
claude·chatgpt
№ 096coding
Generate a Production-Ready Dockerfile and Explain Each Line
Generate a hardened, multi-stage Dockerfile with line-by-line comments and matching .dockerignore.
For
claude·chatgpt
№ 006coding
Explain Complex Code in Simple Terms
Turn confusing code into a clear, junior-friendly explanation with edge-case notes.
For
claude·chatgpt