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.

  • sim642@lemm.ee
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    1
    ·
    1 year ago

    If you think regex is the hard part of programming, then you’re in for a bad time.

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

      I often need to deal with half a dozen different programming languages in any day/week and the context switching can be difficult at times. When you’ve spent all day switching between JavaScript, Python, and YAML and suddenly need to draft some Regex, tools like ChatGPT can help immensely at reducing the mental burden of switching gears.

      • sim642@lemm.ee
        link
        fedilink
        English
        arrow-up
        15
        ·
        1 year ago

        The syntax of regular regexes is the same across languages though. It’s just the regex library which is different, but so is every other library between languages.

    • Nesuniken@lemmy.one
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      If the project is less than a thousand lines of code in a language with a garbage collector, it probably is. Most other problems don’t require learning a DSL to handle them, and most other DSL’s aren’t nearly as terse.