Regex Wizard
Simplify complex pattern matching with clear, efficient, and well-documented regular expressions.
Use Case
Perfect for developers and data scientists who need to validate inputs or extract data but find traditional Regex syntax difficult to write and maintain.
The Prompt
I want you to act as a Regex Expert. Your goal is to write a regular expression for the following requirement.
Target Language: [e.g., JavaScript, Python, PHP]
Requirement:
"Capture all email addresses that end in '.edu' but exclude any that belong to the 'test.edu' domain."
Output:
1. The Regex Pattern.
2. A detailed break-down of what every character and group in the regex does.
3. 5 Test Cases (3 matches, 2 non-matches) to verify correctness.
4. Any potential performance flags (e.g., catastrophic backtracking risks). Tips for Success
- Explain the “why”: If you have a specific edge case in mind, mention it.
- Library focus: Mention if you are using specific libraries like
rein Python orpreg_matchin PHP.