{"uid":"cap_xHZlQNCKth3pMbUSl3AUj","slug":"regex-extract-2613d5fb","name":"regex-extract","description":"Regex extractor: runs a JavaScript regular expression over text and returns all matches with capture groups and positions, the match count, and an error message if the pattern is invalid. $0.01 per call.","url":"https://intel.rallylive.ca/data/regex","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","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_Bjo0ITdj1IWEGK3fmohSR","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":"Runs a JavaScript regular expression over input text and returns all matches, capture groups, match positions, total count, and any pattern error.","exampleAgentPrompt":"Can you run the regex /(\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b)/gi over this text and give me all the email addresses it finds with their positions: 'Contact us at support@example.com or sales@company.org for help'?","exampleUseCases":[{"title":"Extract emails from raw text","prompt":"Run the pattern /[\\w.+-]+@[\\w-]+\\.[\\w.]+/g over this string and tell me every email address it matches along with where in the text each one appears: 'Reach Alice at alice@corp.com or Bob at bob.work@agency.co.uk.'"},{"title":"Parse version numbers from changelog","prompt":"Use the regex /v(\\d+)\\.(\\d+)\\.(\\d+)/g on this changelog snippet and pull out every semantic version number with its major, minor, and patch capture groups: 'Released v1.2.3 and v2.0.0-beta, superseding v0.9.11.'"},{"title":"Validate and count pattern occurrences in logs","prompt":"Run /\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b/g against this server log text and return every IP address match with its character position and the total match count: '2024-01-15 192.168.1.1 GET /index — 10.0.0.5 POST /api'"}],"resultDescription":"Returns a list of all matches found in the text, each with the full match string, any capture group values, and the start/end character positions. Also includes the total count of matches and, if the regex pattern is syntactically invalid, an error message describing the problem.","failureModes":["Invalid or malformed regex pattern returns an error message instead of matches","No matches found returns an empty matches array with count zero","Missing required input parameter causes a request error","Catastrophic backtracking on complex patterns may cause slow or timed-out responses","Special characters in the pattern not properly escaped may produce unexpected results"],"whenToPreferThis":"Choose this endpoint when you need to run a JavaScript-compatible regular expression against text and get back structured match data including capture groups and character positions. It is ideal when your agent needs to extract structured tokens (emails, dates, IPs, codes) from unstructured text, or when you need to verify whether a pattern matches and how many times. Prefer this over general NLP extraction when you know the exact pattern to match.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:13:37.441Z","isFirstParty":false}