Regex Builder
Build and test regular expressions with multi-language syntax support. Create complex patterns, validate against sample data, and explain regex in plain English.
Build, test, and understand regular expressions across multiple programming languages. Construct complex regex patterns, test them against sample data, translate patterns into plain-English explanations, and access a common-pattern library for frequently used validations.
Capabilities
Use cases
Try it
Example prompts to use with this skill
Create a regex pattern to validate email addresses
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
**Explanation:**
- `^` - Start of string
- `[a-zA-Z0-9._%+-]+` - One or more letters, numbers, or special chars (., _, %, +, -)
- `@` - Literal @ symbol
- `[a-zA-Z0-9.-]+` - Domain name with letters, numbers, dots, hyphens
- `\.` - Literal dot
- `[a-zA-Z]{2,}` - Top-level domain (2+ letters)
- `$` - End of string
**Test cases:**
✓ user@example.com
✓ john.doe+filter@company.co.uk
✗ invalid@
✗ @example.comExtract all URLs from text using regex
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)
**Usage in JavaScript:**
const text = "Visit https://example.com or http://test.org";
const urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/g;
const urls = text.match(urlRegex);
console.log(urls); // ['https://example.com', 'http://test.org']
**Python:**
import re
text = "Visit https://example.com or http://test.org"
pattern = r'https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)'
urls = re.findall(pattern, text)
print(urls)Add to your AI assistant
Choose your AI assistant and run the command in your terminal
curl -fsSL https://raw.githubusercontent.com/n3wth/newth-skills/main/skills/regex-builder.md -o ~/.gemini/skills/regex-builder.mdCopycurl -fsSL https://raw.githubusercontent.com/n3wth/newth-skills/main/skills/regex-builder.md -o ~/.claude/skills/regex-builder.mdCopyDiscussions
Sign in with GitHub to join the discussion.
Loading...
Related skills
Code Generation Pipeline
Streamline boilerplate and scaffold generation with automatic validation. Trigger Cursor code generation, extract and organize generated code, validate against project standards, and auto-commit with proper attribution.
Smart .cursor/rules Generator
Auto-generate AI rules from coding patterns and project characteristics. Create project-specific AI rules that match your team's coding style.