• Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    1
    ·
    1 day ago

    You always forget regex syntax?

    I’ve always found it simple to understand and remember. Even over many years and decades, I’ve never had issues reading or writing simple regex syntax (excluding the flags and shorthands) even after long regex breaks.

    • Akito@lemmy.zip
      link
      fedilink
      English
      arrow-up
      13
      ·
      1 day ago

      It’s not about the syntax itself, it’s about which syntax to use. There are different ones and remembering which one is for which language is tough.

        • ewenak@jlai.lu
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          23 hours ago

          There is the “very magic” mode for vim regexes. It’s not the exact PCRE syntax, but it’s pretty close. You only need to add \v before the expression to use it. There is no permanent mode / option though. (I think you can remap the commands, like / to /\v)