regex_build
Describe what you need to match and get a working regex — with explanation, edge cases, and test examples in your language. No more Stack Overflow rabbit holes. Returns pattern, explanation in plain English, and ready-to-paste code snippet. Use when user says 'regex for', 'pattern to match', 'extract X from string', 'validate email/phone/URL'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | Regex flags to apply: global, multiline, case_insensitive. E.g. 'global,case_insensitive'. | |
| examples | No | Examples of strings it should and should NOT match. E.g. 'Should match: (555) 123-4567, 555-123-4567. Should NOT match: 12345'. | |
| language | No | Programming language for the code snippet: javascript, python, go, rust, java, ruby, php. Default: javascript. | |
| description | Yes | What the regex should match. Be specific. E.g. 'US phone numbers with or without country code', 'email addresses', 'any URL', 'dates in MM/DD/YYYY format'. |