{"uid":"cap_BQmHEP6KNsA5qDh0QU17c","slug":"agent402-uk-regex-tester-36dbab6d","name":"Agent402 UK Regex Tester","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/regex","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input text"},"flags":{"type":"string","description":"Optional flags gimsuy"},"pattern":{"type":"string","description":"JS regex source"}}},"responseSchema":{"type":"json","example":{"match":"GB123","valid":true,"matched":true}},"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_GoC11UO8O8usi-pigg5Je","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":"Tests a JavaScript regex pattern against a text string and returns whether it matched, the match value, and pattern validity","exampleAgentPrompt":"Can you test the regex pattern ^GB[0-9]{9}$ against the text 'GB123456789' and tell me if it matches?","exampleUseCases":[{"title":"Validate UK postcode format","prompt":"Run the regex ^[A-Z]{1,2}[0-9][0-9A-Z]?\\s?[0-9][A-Z]{2}$ against the text 'SW1A 2AA' with the i flag and tell me if it's a valid UK postcode."},{"title":"Extract order ID from message","prompt":"Test the pattern ORD-[0-9]{6} against the text 'Your order ORD-482910 has shipped' — does it match, and what did it capture?"},{"title":"Check email format before sending","prompt":"Before I trigger the email workflow, can you verify that the pattern ^[\\w.-]+@[\\w.-]+\\.[a-zA-Z]{2,}$ actually matches 'alice.jones@example.co.uk'?"}],"resultDescription":"Returns a JSON object with three fields: 'valid' (boolean indicating whether the regex pattern itself is syntactically valid), 'matched' (boolean indicating whether the pattern matched the input text), and 'match' (the matched substring if a match was found).","failureModes":["Invalid regex syntax returns valid:false and no match result","Empty pattern or text may return matched:false with no error detail","Unsupported flags (outside gimsuy) may cause the pattern to be rejected","Network or payment failure returns HTTP 402 or 5xx with no result"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a deterministic, safe regex evaluation without risk of hallucinating match results. It is especially useful when the agent must not invent whether a pattern matches — such as input validation gates, data extraction checks, or pre-flight format verification — and when the pattern is a JS-compatible regex.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:51:44.711Z","isFirstParty":false}