• ZILtoid1991@lemmy.worldOP
    link
    fedilink
    arrow-up
    3
    ·
    16 hours ago

    When I wrote my numerical parser, people told me to use regexes to detect what kind of numerical value is being parsed. I just did it in one go. Only regex-like checking is for ISO datetime values.

    • Gil, The Shitposter Of Ages@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      14 hours ago

      regex is computationally pretty cheap, from what I’ve read; due to something about it being a simple AND gate or something… . IDR, and to be honest it doesn’t really matter in the era of 16-core/32thread 5GHz processors… but when you just want it to work… it does “just work”. /shrug.