• ChaoticNeutralCzech@feddit.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    You are right, “elf” is a stretch, it does not make sense to parse it as a number. But in some languages, the string “15 240,5” is just how a number is written (yes, that’s a U+2009 THIN SPACE, you can’t stop me from using it as a thousand separator in German).

    • bitfucker@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      3 months ago

      Alright, maybe you misunderstood the term digits with numbers. When parsing a digit, you do not attach semantic yet to the building blocks. A \d regex parser does not care that the string “555” is not equivalent to “VVV”. All it cares about is that there is the digit “5” or “V”. In the same vein, regex parser should not try to parse IV as a single symbol.