Regex Match & Extract

Apply regex patterns to text and return all matches with capture groups and positions. Use when agents need log parsing, data cleaning, pattern detection, or text extraction. Supports flags, named groups, and multiple patterns.

kennyzir Updated

File contents

Regex Match & Extract

Apply regex patterns to text and get all matches with capture groups, named groups, and positions. Supports single pattern or batch mode (up to 20 patterns).

Use Cases

  • Log parsing (extract timestamps, IPs, error codes)
  • Data cleaning (find and extract structured data)
  • Pattern detection (find emails, URLs, phone numbers)
  • Text extraction (pull specific fields from unstructured text)

Prerequisites

  1. Sign up at claw0x.com
  2. Create API key in Dashboard

Pricing

FREE. No charge per call.

  • Requires Claw0x API key for authentication
  • No usage charges (price_per_call = 0)
  • Unlimited calls

Example

Input:

{
  "text": "Error at 2024-03-15 14:30:22 from 192.168.1.1: Connection timeout",
  "pattern": "(\\d{4}-\\d{2}-\\d{2}) (\\d{2}:\\d{2}:\\d{2})"
}

Output:

{
  "matches": [{"match": "2024-03-15 14:30:22", "index": 9, "groups": null, "captures": ["2024-03-15", "14:30:22"]}],
  "total_matches": 1
}

About Claw0x

Claw0x is the native skills layer for AI agents.

GitHub: github.com/kennyzir/regex-match

kennyzir/claw0x_skills/tree/main/skills/regex-match commit f8762a494e

Frequently asked questions

npx skillmds@latest add kennyzir/regex-match-extract