Generate regex patterns from plain English descriptions. Because nobody actually remembers regex syntax.
Quick Start
npx ai-regex "match email addresses"
What It Does
Converts plain English to working regex
Explains what each part of the pattern does
Provides test cases for validation
Supports common patterns out of the box
Works for any programming language
Usage
# Generate regex from description
npx ai-regex "match phone numbers with optional country code"
# Get regex for URLs
npx ai-regex "validate URLs including localhost"
# Match dates
npx ai-regex "match dates in YYYY-MM-DD format"
Example Output
Pattern: ^[\w.-]+@[\w.-]+\.\w{2,}$
Explanation:
^ - Start of string
[\w.-]+ - One or more word chars, dots, or hyphens
@ - Literal @ symbol
...
Test cases: ✓ test@example.com ✓ user.name@domain.co.uk
Part of the LXGIC Dev Toolkit
One of 110+ free developer tools from LXGIC Studios. No paywalls, no sign-ups.
1---2name: regex-gen3description: Regex Gen4---5# Regex Gen67Generate regex patterns from plain English descriptions. Because nobody actually remembers regex syntax.89## Quick Start1011```bash12npx ai-regex "match email addresses"13```1415## What It Does1617- Converts plain English to working regex18- Explains what each part of the pattern does19- Provides test cases for validation20- Supports common patterns out of the box21- Works for any programming language2223## Usage2425```bash26# Generate regex from description27npx ai-regex "match phone numbers with optional country code"2829# Get regex for URLs30npx ai-regex "validate URLs including localhost"3132# Match dates33npx ai-regex "match dates in YYYY-MM-DD format"34```3536## Example Output3738```39Pattern: ^[\w.-]+@[\w.-]+\.\w{2,}$40Explanation:41 ^ - Start of string42 [\w.-]+ - One or more word chars, dots, or hyphens43 @ - Literal @ symbol44 ...45Test cases: ✓ test@example.com ✓ user.name@domain.co.uk46```4748## Part of the LXGIC Dev Toolkit4950One of 110+ free developer tools from LXGIC Studios. No paywalls, no sign-ups.5152**Find more:**53- GitHub: https://github.com/lxgic-studios54- Twitter: https://x.com/lxgicstudios55- Substack: https://lxgicstudios.substack.com56- Website: https://lxgicstudios.com5758## License5960MIT. Free forever.
Run npx skillmds@latest add demerzels-lab/regex-gen in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Regex Gen It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Demerzels-lab (@demerzels-lab) published this skill. Their other Agent Skills are listed on their SkillMD profile.