Regex tester
Test a regular expression against text and get match results plus text statistics — the quick validation loop for pattern development.
When to use this pack
A developer is writing a regex (email extraction, log parsing, URL matching) and needs to see matches + capture groups + text stats in one shot. Faster than switching between a regex tester and a word counter.
Tools in this pack
-
Regex test
$0.001
POST /api/regex
Run a regular expression against text. Returns up to 100 matches with index and capture groups. Pattern ≤ 200 chars, text ≤ 10KB.
-
Text statistics
$0.001
POST /api/text-stats
Characters, words, sentences, paragraphs, average word length, reading time, and an LLM token estimate for any text.
Workflow
- Run the regex against the text — returns all matches, capture groups, and match indices.
- Compute text-stats on the input text — word count, character count, line count. Useful context for understanding match density (e.g. 2 matches in 50 words = low density).
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Test the regex \b\w+@\w+\.\w+\b against "Contact us at hello@example.com or support@test.org" using Agent402: (1) regex {pattern, text, flags:"g"} — get matches. (2) text-stats {text} — get word/char counts. Return {matches, stats}.
← All skill packs