Regex from Examples
Paste examples of strings that should match (one per line); the tool infers a regex that matches all of them. Useful when you know the shape of what you want to extract but don't want to write the regex by hand. Common patterns (emails, dates, hex IDs, phone numbers) are detected and handled.
How to use the Regex from Examples
Paste the strings you want to match, one per line. Optionally paste counter-examples to refine. The tool tries three strategies: character-class-per-position (good for fixed-shape inputs like IDs), pattern detection (recognizes dates, emails, URLs, hex colors), or literal alternation (when the inputs are unrelated). The generated regex is validated against your examples.