I have to use a ton of regex in my new job (plz save me), and I use ChatGPT for all of it. My job would be 10x harder if it wasn’t for ChatGPT. It provides extremely detailed examples and warns you of situations where the regex may not perform as expected. Seriously, try it out.

  • BenLloydPearson@programming.devOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’ve found that you need to be very careful when asking it to modify things it produced directly without making significant changes to the regex it provides. Once I get to the 3rd or 4th iteration of asking it to modify previous responses I’ve found the likelihood that it starts hallucinating to increase dramatically. The best solution I’ve found to this is to put your entire request in a single prompt that walks it through all requirements step-by-step.