regex

regex is a skill for Claude Code, Codex from bug-ops/zeph. It costs 85 tokens per session (3,501 once invoked), scanned A, original, MIT.

A guide for writing and testing regular expressions, which are patterns used to find, validate, or extract text. It covers matching details such as character groups, repetition, boundaries, and captured parts.

In plain words
What is it for?
Use it to validate formats such as emails, URLs, dates, phone numbers, and IP addresses, or to extract structured text across programming languages.
Why use it?
It helps avoid patterns that match too much, too little, or the wrong text. Testing the expression makes its behavior clearer before it is used in an application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to validate formats such as emails, URLs, dates, phone numbers, and IP addresses, or to extract structured text across programming languages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bug-ops/zeph/regex
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bug-ops/zeph --skill regex
Clone the repo
git clone --depth 1 https://github.com/bug-ops/zeph

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for regex

README.md
[![agentmods](https://agentmods.dev/badge/skills/bug-ops/zeph/regex/github.svg)](https://agentmods.dev/skills/bug-ops/zeph/regex)
Your own site
<a href="https://agentmods.dev/skills/bug-ops/zeph/regex"><img src="https://agentmods.dev/badge/skills/bug-ops/zeph/regex/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for regex

Your own site · 80×15
<a href="https://agentmods.dev/skills/bug-ops/zeph/regex"><img src="https://agentmods.dev/badge/skills/bug-ops/zeph/regex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,501 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.03501
Opus 5.5 $0.00034 $0.01400
Sonnet 5.5 $0.00017 $0.00700
Haiku 4.5 $0.00009 $0.00350

Measured 1mo ago against content hash 291c2584687c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

regex scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.zeph/skills/regex/SKILL.md · 382 lines

How it starts

The opening of the file, as written. The whole thing — 382 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Regular Expressions Reference

Quick Reference

Pattern Matches
. Any character (except newline)
\d Digit [0-9]
\w Word character [a-zA-Z0-9_]
\s Whitespace (space, tab, newline)
\D, \W, \S Negated versions
^ Start of line
$ End of line
\b Word boundary
* 0 or more
+ 1 or more
? 0 or 1 (optional)
{n} Exactly n
{n,m} Between n and m
[abc] Character class
[^abc] Negated character class
(...) Capture group
(?:...) Non-capturing group
a|b Alternation

Character Classes

Shorthand Classes

Class Equivalent Matches
\d [0-9] Digit
\D [^0-9] Non-digit
\w [a-zA-Z0-9_] Word character
\W [^a-zA-Z0-9_] Non-word character
\s [ \t\n\r\f\v] Whitespace
\S [^ \t\n\r\f\v] Non-whitespace
\h [ \t] Horizontal whitespace (PCRE)
\v [\n\r\f\v] Vertical whitespace (PCRE)

POSIX Classes (use inside [...])

Class Matches
[:alpha:] Letters
[:digit:] Digits
[:alnum:] Letters and digits
[:upper:] Uppercase letters
[:lower:] Lowercase letters
[:space:] Whitespace
[:punct:] Punctuation
[:print:] Printable characters
[:graph:] Visible characters (no space)
[:xdigit:] Hex digits [0-9a-fA-F]

Usage: [[:alpha:]] (double brackets when inside a character class).

Custom Character Classes

[aeiou]          # Vowels
[a-z]            # Lowercase letters
[A-Z]            # Uppercase letters
[0-9]            # Digits
[a-zA-Z0-9]     # Alphanumeric
[^aeiou]         # NOT vowels
[a-z&&[^m-r]]   # a-z except m-r (intersection, Java/Rust)
[-.]             # Literal hyphen and dot (hyphen first or last)
[\\^]            # Literal backslash and caret

Quantifiers

Greedy (match as much as possible)

Read the full file on GitHub · 382 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 382 lines · 85 tokens per session scan A 291c2584687c

Subscribe to this mod's changes

regex is a skill published in the GitHub repository bug-ops/zeph (65 stars, last pushed 11d ago), licensed MIT. It adds 85 tokens to every session and 3,501 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.