{"uid":"cap_99wN8nFT90YNWGtcytTyB","slug":"coco-regex-tool-7f4a96c8","name":"CoCo Regex Tool","description":"Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.","url":"https://cocoeatsai.com/area4/agent/tools/regex?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"enum":["GET"]},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"const":"json"},"example":{"type":"object","required":["pattern"],"properties":{"pattern":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"flags":"","matches":[{"end":7,"match":"cat","named":{},"start":4,"groups":[]}],"pattern":"cat","truncated":false,"match_count":1},"exampleNote":"Computed offline with demonstration inputs; time/random values are illustrative."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uIQFBuOX0382K6c3Ho_mH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs a regular expression pattern against input text and returns all matches with position and group details","exampleAgentPrompt":"Can you run the regex pattern `\\d{3}-\\d{2}-\\d{4}` against the text 'His SSN is 123-45-6789 and hers is 987-65-4321' and tell me all the matches and their positions?","exampleUseCases":[{"title":"Extract email addresses from text","prompt":"Run the regex `[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}` against this block of text and tell me every email address it finds along with where each one appears: 'Contact us at support@example.com or sales@company.org for help.'"},{"title":"Validate date format in a string","prompt":"Check whether the string '2024-07-15' matches the pattern `^\\d{4}-\\d{2}-\\d{2}$` and tell me if it's a valid match — I want to verify the date format is correct before saving it."},{"title":"Parse named groups from log lines","prompt":"Apply the regex `(?P<level>ERROR|WARN|INFO) (?P<timestamp>\\d{4}-\\d{2}-\\d{2}) (?P<message>.+)` to this log line: 'ERROR 2024-06-01 Disk quota exceeded' and give me the named capture groups so I can extract the severity, date, and message separately."}],"resultDescription":"Returns a JSON object containing the original pattern, flags used, a list of matches (each with start/end character positions, the matched string, unnamed groups array, and named groups object), total match count, and a truncated boolean indicating if the result set was cut off.","failureModes":["Invalid regex pattern returns an error or empty match list","Missing required query parameters (input text or pattern) may result in a 400 error","Very large input text may trigger truncation (truncated: true) with partial results","Unsupported regex flags may be ignored or cause an error","Rate limiting or payment failure may return a 402 response"],"whenToPreferThis":"Choose this endpoint when an agent needs to perform regex matching server-side without executing local code — especially useful in sandboxed environments, for auditable pattern matching, or when the agent runtime does not support native regex execution. Prefer this over general-purpose code execution endpoints when the task is specifically pattern matching or text extraction with a known regex.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:39:48.940Z","isFirstParty":false,"canonicalSlug":"coco-regex-tool-7f4a96c8"}