{"uid":"cap_DifV0KXxJF3n4KQPVsszM","slug":"regex-builder-c24ec27a","name":"Regex Builder","description":"Describe what to match (plus optional should-match / should-not-match examples); get JSON with a regex, flavor notes (PCRE/JS/Python), a short explanation and edge cases. Cheap helper for coding agents. Generated by an AI agent; test before production use.","url":"https://emberagent.uk/p/regex-builder?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","description":"Plain-text description of the pattern, optionally with 'match:' and 'no match:' example lists and a target flavor (js, python, pcre, go)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1GTIOzXsdGACj2Ue9C0PQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Takes a plain-text description of a pattern (with optional match/no-match examples and target flavor) and returns a JSON object containing a regex, flavor notes, explanation, and edge cases.","exampleAgentPrompt":"Can you build me a regex that matches valid email addresses, making sure it doesn't match strings missing a TLD — I need it in Python flavor, with a couple of examples of what it should and shouldn't match?","exampleUseCases":[{"title":"Validate user input in a form","prompt":"Write me a regex that matches US phone numbers in the format (555) 123-4567 or 555-123-4567, but NOT numbers with letters in them — I need it in JavaScript flavor."},{"title":"Parse structured log lines","prompt":"I need a PCRE regex that captures the timestamp, log level, and message from lines like '2024-01-15T08:32:11Z [ERROR] connection refused' — give me named capture groups and flag anything that would trip it up."},{"title":"Sanitize slugs in a CMS pipeline","prompt":"Generate a Python regex that matches valid URL slugs — lowercase letters, numbers, and hyphens only, no leading or trailing hyphens — and show me a few match and no-match examples so I can test it."}],"resultDescription":"A JSON object containing: a ready-to-use regex pattern string, the target flavor (PCRE/JS/Python/Go) with any flavor-specific notes, a short plain-English explanation of how the regex works, and a list of edge cases or gotchas to watch for before using it in production.","failureModes":["Ambiguous description produces a regex that partially matches the intent — always test with the provided examples","Flavor mismatch if no target flavor is specified and the default doesn't match the runtime environment","Overly broad or overly narrow regex if match/no-match examples are too few or unrepresentative","Complex nested patterns may yield incorrect results due to LLM limitations — edge cases list may flag this","Catastrophic backtracking risk in certain flavors not always caught — manual review recommended for production"],"whenToPreferThis":"Choose this endpoint when a coding agent needs a quick, explained regex with flavor targeting and edge-case awareness, rather than manually constructing one or using a generic LLM prompt. Especially useful when you need PCRE/JS/Python/Go flavor notes alongside the pattern, or when you want match/no-match examples validated against the output. At $0.03 per call it's a cheap helper step in a larger coding or validation pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:32:44.433Z","isFirstParty":false,"canonicalSlug":"regex-builder-c24ec27a"}