ChatGPT can give you statements that either:
- Sounds very truthful, but has something wrong with it
- Is surprisingly good and accurate
With Regex questions, it seems to weigh way more on the latter.
A few examples:
Match any email address that ends with "gmail.com" and contains a plus sign (+) followed by any combination of alphanumeric characters before the @ symbol
Match any phone number in the format (XXX) XXX-XXXX where the first three digits cannot be 555
Be careful, it's prone to mistakes, so it's always a good idea to test it on an app like https://regex101.com/
Overall, I feel like most of the generated regular expressions are already going to be good enough to save some valuable minutes of your life.
Top comments (0)