regex-builder

Craft, test, and explain regex patterns across sample text and files.

130|15|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/jMerta/codex-skills --skill regex-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regex-builder
Source: https://github.com/jMerta/codex-skills/tree/main/regex-builder
Command: npx skills add https://github.com/jMerta/codex-skills --skill regex-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users craft, test, and explain regex patterns across sample text and codebases, reducing guesswork and errors when searching or validating strings.

Core Features & Use Cases

  • Interactive regex construction with support for multiple flavors (PCRE, Python, JavaScript, RE2).
  • Live verification against sample text or files using rg and Python.
  • Explanation of the final regex, including capture groups and boundary assertions.
  • Use Case: Validate an email-like pattern across a document set or extract IDs from code.

Quick Start

Example: craft a PCRE regex to match email addresses in sample.txt and verify with a Python snippet.

Frequently Asked Questions about regex-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and test a regex pattern across multiple files?

This Skill lets you craft and verify regex patterns interactively, testing them against sample text or files using rg and Python. It supports multi-line inputs and multiple regex flavors including PCRE, Python, JavaScript, and RE2 to ensure pattern accuracy.

Does this regex builder support different regular expression flavors like PCRE and RE2?

Yes, the regex builder supports PCRE, Python, JavaScript, and RE2 flavors. It allows you to craft and verify patterns specific to your target environment, yielding the final regex, its flags, and an explanation of the design decisions.

Can I use Python to verify a regular expression for email validation?

Yes, you can verify a regular expression for email validation using Python. The Skill relies on Python and rg for live verification against sample text or files, ensuring your pattern accurately matches the intended strings.

What is the best way to explain how a complex regular expression works?

The best way to explain a complex regular expression is using this Skill, which generates a detailed breakdown of the final regex. It explains design decisions, capture groups, and boundary assertions to clarify how the pattern matches text.

How do I match and extract specific IDs from a codebase using regular expressions?

To extract IDs from a codebase using regular expressions, craft your pattern and verify it against the files. This Skill uses rg to search and confirm matches, yielding the final regex and an explanation of its capture groups and boundaries.