please write a regex that has a capture group for a phone number and email in the text
- User
please write a regex that has a capture group for a phone number and email in the text
Assistant
Sure! Here's a regex that matches phone numbers and email addresses in the text:
javascript\b\d{3}[-\s]\d{3}[-\s]\d{4}\b|\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\bThis regex matches phone numbers with the pattern
\d{3}[-\s]\d{3}[-\s]\d{4}or email addresses with the pattern[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}. You can adjust the pattern to match other phone or email formats if needed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.