{"uid":"cap_3vcW-xBLCSGve2hE94xJv","slug":"regex-test-match-pattern-against-string-29044622","name":"Regex Test — Match Pattern Against String","description":"Test a string against a regular expression and return matches","url":"https://x402render-u5vwpxpyua-uc.a.run.app/regex-test","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"string"},"flags":{"type":"string","description":"string (optional)"},"pattern":{"type":"string","description":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NrckI9n6TZeLDjeCIonsE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Tests a string against a regular expression pattern and returns matches, with optional flags","exampleAgentPrompt":"Test the text \"Order #12345 placed on 2024-03-15\" against the regex pattern \\d{4}-\\d{2}-\\d{2} with the global flag and tell me all the matches.","exampleUseCases":[{"title":"Extract dates from log entries","prompt":"I have this log line: \"Session started 2024-01-10, expires 2024-04-10\" — can you run the pattern \\d{4}-\\d{2}-\\d{2} with the global flag against it and return all the date matches?"},{"title":"Validate custom format before processing","prompt":"Check whether the string \"INV-2024-00892\" matches the pattern ^INV-\\d{4}-\\d{5}$ so I can confirm it's a valid invoice number before I process it."},{"title":"Case-insensitive keyword search in content","prompt":"Run the regex pattern \\berror\\b against this text \"An Error occurred in the pipeline\" using the case-insensitive flag and tell me if and where it matches."}],"resultDescription":"Returns whether the pattern matched, along with the matched substrings, their positions in the original text, and any capture group contents. Results reflect the behaviour of the supplied flags (e.g. global, case-insensitive, multiline).","failureModes":["Invalid regex pattern syntax returns an error response","Missing required 'text' or 'pattern' fields causes a 400-level error","Extremely long input strings may time out or be rejected","Invalid flag characters may cause a parsing error","Payment failure (non-payment of $0.01 USDC) results in a 402 response"],"whenToPreferThis":"Choose this endpoint when you need a quick, stateless regex match or extraction against a single string without setting up a local runtime. It's ideal for agents that need to validate or extract structured fragments (dates, IDs, URLs) from text on the fly, especially in serverless or sandboxed environments where running native regex code is inconvenient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:46:56.432Z","isFirstParty":false}