<GuilhermeFront />

ChatGPT is a regex god

ChatGPT can give you statements that either:

  1. Sounds very truthful, but has something wrong with it
  2. Is surprisingly good and accurate

With Regex questions, it seems to weigh way more on the latter.

image

A few examples:

  1. Match a Reddit post URL image

  2. Match a Twitter reply image

  3. Match a document format from a country image

  4. Match any email address that ends with “gmail.com” and contains a plus sign (+) followed by any combination of alphanumeric characters before the @ symbol image

  5. Match any phone number in the format (XXX) XXX-XXXX where the first three digits cannot be 555 image

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.