{"uid":"cap_-ArQqsiWYpGjK7Cvn0xFf","slug":"agentstoolshub-regex-tester-4831d5cf","name":"AgentsToolsHub Regex Tester","description":"Test a regular expression against text and see every match: the matched substring, its index, and all capture groups. Deterministic — the same pattern and text always produce the same result, unlike LLM-simulated regex matching. Use this when an agent needs to pattern + text → every match, group and index.","url":"https://agentstoolshub.com/api/v1/dev/regex-tester?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["pattern","text"],"properties":{"text":{"type":"string","description":"Text to test"},"flags":{"type":"string","description":"Flags"},"pattern":{"type":"string","description":"Pattern"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"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_RsyjS6JTD6m9v5Nb-axGw","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 regular expression against text and returns every match with its substring, character index, and all capture groups.","exampleAgentPrompt":"Run the regex pattern (\\d{4}-\\d{2}-\\d{2}) with the global flag against this text: 'Meeting on 2024-03-15 and follow-up on 2024-04-01' — show me every match, its position, and capture groups.","exampleUseCases":[{"title":"Extract all email addresses from text","prompt":"Run the pattern ([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}) with global flag against this text: 'Contact us at support@example.com or sales@company.org for help' — I want every match and its position."},{"title":"Validate regex captures correct date format","prompt":"Test the regex (\\d{1,2})\\/(\\d{1,2})\\/(\\d{4}) against the string '12/25/2024 and 01/01/2025' using the global flag, and show me the capture groups so I can confirm day, month, and year are being captured separately."},{"title":"Parse version numbers from release notes","prompt":"Use the pattern v(\\d+)\\.(\\d+)\\.(\\d+) with the global flag on this text: 'Released v1.2.3, hotfix in v1.2.4, upgrade to v2.0.0' — I need every version match with its index and the three version-number capture groups."}],"resultDescription":"Returns an array of match objects, each containing the full matched substring, the character index of the match within the input text, and an array of all capture group values (in group order). The same pattern and text always produce identical results.","failureModes":["Invalid regex pattern returns an error indicating malformed syntax","Missing required 'pattern' or 'text' query parameters returns a 400 error","Regex with catastrophic backtracking may time out on large inputs","Empty text string returns an empty matches array","Unsupported regex flags may be rejected or silently ignored"],"whenToPreferThis":"Choose this endpoint when you need deterministic, exhaustive regex matching with full capture group and index data — especially when LLM-simulated regex matching would be unreliable. Ideal for agents that need to extract structured data from text (emails, dates, version numbers, phone numbers) with exact character positions. Prefer this over general-purpose text extraction when the pattern is known and precision is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:30:03.121Z","isFirstParty":false,"canonicalSlug":"agentstoolshub-regex-tester-4831d5cf"}