{"uid":"cap_TzCwtaJ5CSteMMFbRXsQx","slug":"molcloud-regex-validator-b768a702","name":"MolCloud Regex Validator","description":"41 pay-per-request AI, search, headless browser, crypto alpha & memory APIs for autonomous agents settling in USDC on Base via x402 v2.","url":"https://api.molcloud.net/api/tools/regex?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text corpus to test against"},"flags":{"type":"string","default":"g","description":"Regex flags (default: g)"},"pattern":{"type":"string","description":"Regular expression pattern"}}},"responseSchema":{"type":"json","example":{"data":{"isValid":true,"matchCount":1},"status":"success","endpoint":"/api/tools/regex"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fmP5K0sZSrWk4qy3vR-tw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Tests a text corpus against a regular expression pattern and returns match validity and match count","exampleAgentPrompt":"Test whether the pattern \\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b with flags 'gi' matches anything in this text: 'Contact us at support@example.com or sales@company.org for help.'","exampleUseCases":[{"title":"Log file pattern detection","prompt":"Check how many times the error pattern 'ERROR:\\s+\\w+' appears in this log dump using global flag: 'INFO: start\\nERROR: timeout\\nINFO: retry\\nERROR: conn_refused'"},{"title":"Email format validation in user input","prompt":"Does the regex '^[\\w.-]+@[\\w.-]+\\.\\w{2,}$' with no flags match the string 'jane.doe@gmail.com'? I need to know if it's valid and the match count."},{"title":"Extracting version numbers from release notes","prompt":"Run the pattern 'v\\d+\\.\\d+\\.\\d+' with the global flag against this text and tell me how many version numbers appear: 'Released v1.0.0, updated in v1.2.3, latest is v2.0.1.'"}],"resultDescription":"Returns a JSON object with a 'data' field containing 'isValid' (boolean indicating whether the pattern matched at all) and 'matchCount' (integer of total matches found), plus a 'status' string and the endpoint path confirming the call.","failureModes":["Invalid regex pattern syntax returns an error or isValid:false with matchCount 0","Missing required 'pattern' or 'text' fields causes a 400-level error","Extremely large text corpora may hit request size limits","Unsupported flag characters may be silently ignored or cause errors","Payment failure via x402 returns a 402 response before processing"],"whenToPreferThis":"Choose this endpoint when an AI agent needs lightweight, pay-per-use regex validation or match counting without spinning up a code execution environment. Ideal for pipelines that need to validate user input formats, scan text for patterns, or count occurrences at low cost ($0.002 USDC) without managing infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:57.750Z","isFirstParty":false,"canonicalSlug":"molcloud-regex-validator-b768a702"}