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
    241 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
      41 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
        151 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
      11 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.