Removes the need to
Removes the need to remember regex syntax for common patterns like emails, dates, IPs, and hex codes.
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Generate a regular expression from positive and negative example strings — rule-based inference with live test panel.
Writing regular expressions from scratch is error-prone. This tool takes a different approach: provide example strings that should match and optionally strings that should not, and it infers a pattern for you. The inference engine detects emails, IPs, ISO dates, hex colors, URLs, and general structures by analyzing common prefixes, suffixes, character classes, and length ranges. The generated pattern comes with a plain-English explanation of each component so you can understand and refine it. A live test panel highlights matches in green and non-matches in red as you type. Options control anchoring (^ and $) and case-insensitivity. The generated pattern is a starting point — solid for common structures and easy to adjust for edge cases.
Removes the need to remember regex syntax for common patterns like emails, dates, IPs, and hex codes.
Plain-English explanation of each pattern component helps you understand and modify the output.
Live test panel gives immediate feedback without switching to a separate regex tester.
Negative examples add validation — you see warnings when the pattern still matches things it should not.
Pure JavaScript, no server — works offline and processes nothing outside your browser.
Removes the need to remember regex syntax for common patterns like emails, ISO dates, IPs, UUIDs, and hex codes — paste examples and let the tool infer.
Input: Positive examples: alice@example.com bob+filter@subdomain.example.co.uk chris.morgan@deep.subdomain.io Negative examples: foo@bar no-at-sign.example.com
Output: Pattern: ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ Explanation: 'one or more letters/digits/._%+-, then @, then a domain, then a dot, then a 2+ letter TLD'.
Input: Positive examples: 2026-05-08 2026-12-31 2025-01-01
Output: Pattern: ^\d{4}-\d{2}-\d{2}$ Explanation: 'four digits, dash, two digits, dash, two digits' — matches ISO 8601 calendar dates.
Input: Positive examples: #3b82f6 #FFFFFF #000 #a1b Negative examples: 3b82f6 #GGHHII
Output: Pattern: ^#[A-Fa-f0-9]{3,6}$ Explanation: '# followed by 3 to 6 hex digits'. Warning if you also need to reject 4 or 5 hex digits, narrow to {3} or {6}.
Input: Positive examples: 550e8400-e29b-41d4-a716-446655440000 f47ac10b-58cc-4372-a567-0e02b2c3d479 123e4567-e89b-12d3-a456-426614174000
Output: Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Explanation: 'eight hex digits, dash, four hex digits, dash, four hex digits, dash, four hex digits, dash, twelve hex digits' — matches RFC 4122 UUIDs.