• Skyrmir@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    2
    ·
    5 days ago

    Never debug regex, just generate a new one. It’s not worth the hassle to figure out not only what it does, but what it was meant to do.

    Better yet, just write it out in code, and never use regex. Tis a stupid thing that never should have been made.

    • Hoimo@ani.social
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      I love regex and I use it a lot, but I very rarely use it in any kind of permanent solution. When I do, I make sure to keep it as minimal as possible, supplementing with higher level programming where possible. Backreferences and assertions are a cardinal sin and should never be used.