{"uid":"cap_nCOMgDxIWp0aXAVIPho8Y","slug":"toolbelt402-regex-tester-552c5040","name":"Toolbelt402 Regex Tester","description":"Test and debug a regular expression against up to 50 sample strings — real match results, capture groups, named groups, and pass/fail against expectations. Deterministic regex testing.","url":"https://toolbelt402.tpoborne.workers.dev/regex/test","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cases":{"type":"array","items":{"type":"object","properties":{"input":{"type":"string"},"expectMatch":{"type":"boolean"}}}},"flags":{"type":"string","description":"Any of g i m s u y v d"},"pattern":{"type":"string"}}},"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_oxYsBE_zaBHrtgmOdeUv9","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 and debugs a regular expression against up to 50 sample strings, returning match results, capture groups, named groups, and pass/fail evaluations against expectations.","exampleAgentPrompt":"Can you test my regex pattern `^(\\d{4})-(\\d{2})-(\\d{2})$` with the `i` flag against these strings: '2024-01-15' (expect match), 'hello-world' (expect no match), and '2024-13-99' (expect no match) — and show me the capture groups?","exampleUseCases":[{"title":"Validate email regex before shipping","prompt":"I've written this regex for email validation: `^[\\w.+-]+@[\\w-]+\\.[a-z]{2,}$` with the `i` flag. Can you test it against 'user@example.com' (should match), 'bad@' (should not match), and 'another.user+tag@sub.domain.org' (should match), and show me if the capture groups look right?"},{"title":"Debug named capture groups in log parser","prompt":"I'm trying to parse log lines with this regex: `(?P<level>ERROR|WARN|INFO)\\s+(?P<msg>.+)` — can you run it against 'ERROR Something went wrong' (expect match), 'INFO Server started' (expect match), and 'DEBUG this should fail' (expect no match), and show me the named groups?"},{"title":"Confirm regex flags behave as expected","prompt":"Test my case-insensitive pattern `^hello\\s+world$` with the `im` flags against 'Hello World' (should match), 'HELLO  WORLD' (should match), and 'goodbye world' (should not match) — I want to see the actual match results and whether each case passes."}],"resultDescription":"Returns per-test-case results including whether the regex matched each input string, the full match text, indexed capture groups, named capture groups, match positions, and a pass/fail verdict compared against the expected outcome. Typically covers up to 50 test cases per call.","failureModes":["Invalid regex pattern syntax returns an error describing the parse failure","Exceeding 50 test cases may result in truncation or rejection","Unsupported or conflicting regex flags return a flag validation error","Missing required fields (pattern or cases) result in a 400-level error","Regex with catastrophic backtracking may time out"],"whenToPreferThis":"Choose this endpoint when you need deterministic, server-side regex validation with structured pass/fail reporting across multiple test strings — especially when you want capture group and named group extraction confirmed, or when building/debugging regex patterns programmatically without relying on a local execution environment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:41:45.614Z","isFirstParty":false}