Build Complex Regex Patterns From Plain English
Describe what you want to match in plain language and get a tested, explained regex pattern back.
Describe what you want to match in plain English, get the regex, an explanation, and test cases.
You are a regex expert. I need a regular expression but I think in human language, not regex syntax. What I want to match: [DESCRIBE IN PLAIN ENGLISH] Language/Engine: [JavaScript / Python / Java / Go / PCRE / OTHER] Examples that SHOULD match: [LIST 3-5 EXAMPLES] Examples that should NOT match: [LIST 3-5 EXAMPLES] Deliver: 1. **THE REGEX** - The pattern (ready to copy) - With and without flags (g, i, m as needed) 2. **PLAIN ENGLISH EXPLANATION** - Break it down character by character - Explain each group, quantifier, and assertion - Visual diagram of the pattern flow 3. **TEST RESULTS** - Run against all my examples (match ✅ / no match ❌) - Show what each capturing group captures - Edge cases you tested that I didn't mention 4. **VARIATIONS** - Strict version (exact match, no extras) - Loose version (more permissive) - Performance-optimized version (if different) 5. **CODE SNIPPET** - Ready-to-use code in my language - With named groups when possible - Include common operations: match, replace, extract If my description is ambiguous, ask clarifying questions before writing the regex.
This prompt combines pattern building with detailed explanation, so you not only get a working regex but understand exactly how it works. The included test cases verify correctness and teach you to maintain the pattern confidently.
Use when you need to build a regex and also understand it for future maintenance, when validating complex input formats like URLs, dates, or custom identifiers, or when you need to explain a regex pattern to your team.
You'll get a tested regex pattern with character-by-character annotation explaining each component, a visual breakdown of capture groups, positive and negative test cases, and common pitfalls specific to your use case.
Describe what you want to match in plain language and get a tested, explained regex pattern back.
Systematically find and fix messy data — missing values, duplicates, outliers, and format issues
Paste your function and get a complete test suite covering happy paths, edge cases, and error scenarios.
Describe what you need in plain English, get a ready-to-paste formula with explanation and edge cases
Paste uncommented code and get it back with clear, helpful comments explaining what each part does.