{"uid":"cap_J3X3nwF660GxgWTWQrTWX","slug":"lordevo-regex-tester-3a87cd59","name":"Lordevo Regex Tester","description":"Regex tester: matches, groups, replace and split (JavaScript flavor): Runs a JavaScript (ECMAScript) regular expression on your text and returns every match with index, line, column, numbered and named groups, or the result of replace or split. Catastrophic patterns are stopped after 3 seconds and n","url":"https://shop.lordevo.com/api/quick/regex-test?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":{"mode":{"enum":["match","test","replace","split"],"type":"string","default":"match","description":"match (all matches with groups, default), test (first match only), replace or split"},"text":{"type":"string","maxLength":400000,"description":"Text to run the regex on, up to 400,000 characters (POST for long text)"},"flags":{"type":"string","pattern":"^[dgimsuyv]{0,8}$","description":"Regex flags, e.g. gi (or write the pattern as /.../flags)"},"pattern":{"type":"string","description":"JavaScript regular expression, up to 2,000 characters, either the bare pattern or /pattern/flags"},"replace":{"type":"string","maxLength":10000,"description":"Replacement for mode=replace ($1, $<name>, $&; default empty = delete matches)"},"max_matches":{"type":"string","default":"100","pattern":"^\\d{1,4}$","description":"Matches to list, 1-1000 (default 100)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["tool","pattern","mode"],"properties":{"mode":{"enum":["match","test","replace","split"],"type":"string"},"tool":{"type":"string"},"flags":{"type":"string"},"notes":{"type":"array"},"parts":{"type":"array","items":{"type":["string","null"]}},"flavor":{"type":"string"},"result":{"type":"string"},"matched":{"type":"boolean"},"matches":{"type":"array","items":{"type":"object","properties":{"end":{"type":"integer"},"line":{"type":"integer"},"index":{"type":"integer"},"match":{"type":"string"},"named":{"type":["object","null"]},"column":{"type":"integer"},"groups":{"type":"array","items":{"type":["string","null"]}}}}},"pattern":{"type":"string"},"truncated":{"type":"boolean"},"group_count":{"type":"integer"},"group_names":{"type":"array","items":{"type":"string"}},"match_count":{"type":"integer"},"replaced_count":{"type":"integer"}}}}}}},"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_lunH0cHP2qQY44Bpj2tLI","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":"Runs a JavaScript (ECMAScript) regular expression on text and returns matches with index, line, column, groups, or performs replace/split operations","exampleAgentPrompt":"Run this JavaScript regex pattern `(\\d{4})-(\\d{2})-(\\d{2})` with the global flag on the text 'Order placed on 2024-03-15 and shipped on 2024-04-01' in match mode, and give me all matches with their named groups and positions.","exampleUseCases":[{"title":"Extract emails from a document","prompt":"Use a regex to extract all email addresses from this text: 'Contact us at support@example.com or billing@company.org for help.' — run the pattern `[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}` with the global flag and return every match with its position."},{"title":"Validate date format in log entries","prompt":"Test whether the pattern `^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$` matches the string '2024-06-01T12:00:00Z' using test mode — just tell me if it matched or not."},{"title":"Replace phone numbers in user-submitted text","prompt":"I need to redact phone numbers from this paragraph: 'Call John at 555-123-4567 or Mary at 555-987-6543.' — use the regex `\\d{3}-\\d{3}-\\d{4}` in replace mode and substitute every match with '[REDACTED]'."}],"resultDescription":"Returns a JSON object containing the regex pattern and mode used, a list of matches (each with the matched string, start/end index, line, column, numbered groups array, and named groups object), or for replace mode the resulting string, or for split mode an array of string parts. Also includes a matched boolean and any notes (e.g. truncation warnings if max matches is hit or the pattern timed out after 3 seconds).","failureModes":["Catastrophic backtracking patterns are terminated after 3 seconds and return a timeout/truncation note","Invalid regex syntax returns an error response","Pattern or text exceeding length limits (2,000 chars for pattern, 400,000 chars for text) may be rejected","Invalid flags (outside [dgimsuyv]) are rejected by schema validation","Invalid mode value returns an error"],"whenToPreferThis":"Choose this endpoint when you need server-side JavaScript-flavor regex execution without spinning up a runtime — especially useful for agents that need match positions (line/column), named capture groups, or safe execution with catastrophic-backtracking protection. Prefer over client-side regex when you need structured JSON output with rich metadata per match.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:32.978Z","isFirstParty":false,"canonicalSlug":"lordevo-regex-tester-3a87cd59"}