home / skills / openclaw / skills / regex-writer
This skill turns plain English into working regex patterns with explanations and examples to help you build accurate expressions quickly.
npx playbooks add skill openclaw/skills --skill regex-writerReview the files below or copy the command above to add this skill to your agents.
---
name: regex-writer
description: Generate regex patterns from plain English descriptions. Use when the user needs to create regular expressions without memorizing syntax.
---
# Regex Writer
Turn plain English into working regex patterns. Describe what you want to match and get a tested pattern back with explanation and examples.
## Usage
```bash
npx ai-regex "your description here"
```
## Examples
```bash
# Match email addresses
npx ai-regex "match valid email addresses"
# Extract phone numbers
npx ai-regex "US phone numbers with optional country code"
# Get JSON output
npx ai-regex --json "URLs starting with https"
```
## Notes
- Free, open source, MIT licensed
- Built by LXGIC Studios
- GitHub: https://github.com/LXGIC-Studios/ai-regex
This skill generates regular expressions from plain English descriptions so you can produce tested, ready-to-use patterns without memorizing regex syntax. It returns a working pattern, usage examples, and a short explanation to help validate and adapt the result. The goal is fast, reliable regex creation for validations, extraction, and search tasks.
You describe what you want to match in plain language and the skill converts that description into a regex pattern. It also provides example matches and non-matches, a brief explanation of the pattern components, and optional JSON output for programmatic workflows. Patterns are framed for common regex engines and include notes about anchors or flags where relevant.
Can the skill target a specific regex flavor?
Yes. Indicate the target engine or flags in your description and the pattern will include notes or adjustments for that flavor (for example, JavaScript vs PCRE).
How can I be sure the regex won’t produce false positives?
Provide representative positive and negative examples in your prompt. I return example matches and non-matches so you can quickly validate and refine the pattern before use.