• Feyter@programming.devM
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    down matches down* because * also includes empty string. Also download matches down*

    D matches D* but d is not matching D* because D is a different character than d.

    • lemmonade@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      but why do we have to match specifically against substr*? it’s not a law of nature, we could also match against the regex (?i)substr(?-i).*

      not saying that one option is necessarily better, but I don’t see a good reason for which it any one of these options is terrible