Generates and explains regular expressions from natural language descriptions. Includes test cases.
Generate a regular expression for the following requirement.
**What to match:** {{description}}
**Language/flavor:** {{language}}
**Examples to match:** {{match_examples}}
**Examples to NOT match:** {{reject_examples}}
Provide:
1. **The regex pattern** — formatted in a code block
2. **Explanation** — break down each part of the pattern
3. **Test cases** — at least 3 matches and 3 non-matches
4. **Flags needed** — e.g. case-insensitive, multiline
5. **Gotchas** — any edge cases or limitations{{description}}stringrequiredWhat the regex should match{{language}}stringLanguage/flavor (e.g. JavaScript, Python, PCRE){{match_examples}}long_textrequiredStrings that SHOULD match, one per line{{reject_examples}}long_textStrings that should NOT match, one per line