• 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.

    • Lehmanator@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 hours ago

      This is exactly it. Regex is super simple. The difficulty is maintaining a mental mapping between language/util <-> regex engine <-> engine syntax & character class names. It gets worse when utils also conditionally enable extended syntaxes with flags or options.

      The hardest part is remembering whether you need to use \w or [:alnum:].

      Way too few utils actually mention which syntax they use too. Most just say something accepts a “regular expression”, which is totally ambiguous.

    • Lehmanator@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      This is exactly it. Regex is super simple. The difficulty is maintaining a mental mapping between language/util <-> regex engine <-> engine syntax & character class names. It gets worse when utils also conditionally enable extended syntaxes with flags or options.

      The hardest part is remembering whether you need to use \w or [:alnum:].

      Way too few utils actually mention which syntax they use too. Most just say something accepts a “regular expression”, which is totally ambiguous.

    • Lehmanator@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      This is exactly it. Regex is super simple. The difficulty is maintaining a mental mapping between language/util <-> regex engine <-> engine syntax & character class names. It gets worse when utils also conditionally enable extended syntaxes with flags or options.

      The hardest part is remembering whether you need to use \w or [:alnum:].

      Way too few utils actually mention which syntax they use too. Most just say something accepts a “regular expression”, which is totally ambiguous.

    • Lehmanator@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      This is exactly it. Regex is super simple. The difficulty is maintaining a mental mapping between language/util <-> regex engine <-> engine syntax & character class names. It gets worse when utils also conditionally enable extended syntaxes with flags or options.

      The hardest part is remembering whether you need to use \w or [:alnum:].

      Way too few utils actually mention which syntax they use too. Most just say something accepts a “regular expression”, which is totally ambiguous.