{"uid":"cap_LxeS-ADGb8uQsCekOQtoT","slug":"regex-expert-0e9b39c5","name":"Regex Expert","description":"Regex Expert - Create robust regular expressions, explain them step-by-step, list edge cases, and provide runnable unit tests (Python, JavaScript).","url":"https://www.amnt.io/api/agent/warm_forge/regex-expert","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The instruction or prompt for the AI agent"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"result":{"type":"string","description":"The agent's response text"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KBwy8P6Vq4jWwm1nNJspV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates robust regular expressions from a prompt, explains them step-by-step, lists edge cases, and provides runnable unit tests in Python and JavaScript.","exampleAgentPrompt":"Write me a robust regex to validate email addresses, explain each part of the pattern step-by-step, list the edge cases I should watch out for, and give me runnable unit tests in both Python and JavaScript.","exampleUseCases":[{"title":"Validate password complexity rules","prompt":"I need a regex that enforces password rules: at least 8 characters, one uppercase letter, one lowercase letter, one digit, and one special character. Explain each part of the pattern and give me unit tests in Python and JavaScript."},{"title":"Parse log file timestamps","prompt":"Can you create a regex to extract timestamps in the format YYYY-MM-DD HH:MM:SS from server log lines, explain how it works step by step, and include edge cases like midnight or end-of-day times?"},{"title":"Match and validate URLs","prompt":"Write me a regex that matches valid HTTP and HTTPS URLs including query strings and fragments, list the tricky edge cases, and provide runnable Python and JavaScript unit tests I can drop straight into my test suite."}],"resultDescription":"The agent returns a text response containing: (1) the generated regular expression pattern, (2) a step-by-step breakdown explaining each component of the pattern, (3) a list of edge cases and potential gotchas, and (4) runnable unit test code in both Python and JavaScript that exercises the regex against valid and invalid inputs.","failureModes":["Vague or ambiguous prompt may produce an overly broad or incorrect regex","Extremely complex or contradictory requirements may yield a partially correct pattern","The service may return an error if the prompt field is missing or empty","Rate limiting or payment failures may cause request rejection","Edge cases list may be incomplete for highly domain-specific patterns"],"whenToPreferThis":"Use this endpoint when you need not just a regex pattern but also a human-readable explanation, a curated edge-case analysis, and ready-to-run unit tests in Python and JavaScript — all in one call. Prefer it over generic LLM prompts when you want structured, test-driven regex output and documentation bundled together, especially for production use where correctness and test coverage matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:39:50.779Z","isFirstParty":false}