#metabrainz

/

      • worldlooksblack has quit
      • 2025-09-25 26846, 2025

      • worldlooksblack joined the channel
      • 2025-09-25 26846, 2025

      • worldlooksblack has quit
      • 2025-09-25 26846, 2025

      • worldlooksblack joined the channel
      • 2025-09-25 26808, 2025

      • Maxr1998_ joined the channel
      • 2025-09-25 26810, 2025

      • Maxr1998 has quit
      • 2025-09-25 26844, 2025

      • SigHunter has quit
      • 2025-09-25 26824, 2025

      • SigHunter joined the channel
      • 2025-09-25 26825, 2025

      • SigHunter has quit
      • 2025-09-25 26834, 2025

      • SigHunter joined the channel
      • 2025-09-25 26826, 2025

      • wargreen_ has quit
      • 2025-09-25 26839, 2025

      • reosarevok[m]
        Argh, regexes. Halp?
      • 2025-09-25 26817, 2025

      • reosarevok[m]
        I currently have this in my parse date code
      • 2025-09-25 26820, 2025

      • reosarevok[m]
        const ymdRegex = /^\W*([0-9]{4})(?:\W+(0?[1-9]|1[0-2])(?:\W+(0?[1-9]|[12][0-9]|3[01]))?)?\W*$/;
      • 2025-09-25 26837, 2025

      • reosarevok[m]
        I wanted it to also support parsing ????-??-22 or whatnot
      • 2025-09-25 26847, 2025

      • reosarevok[m]
        So I thought I'd do
      • 2025-09-25 26850, 2025

      • reosarevok[m]
        ^\W*([0-9]{4}|\?{4})(?:\W+(0?[1-9]|1[0-2]|\?{2})(?:\W+(0?[1-9]|[12][0-9]|3[01]|\?{2}))?)?\W*$
      • 2025-09-25 26822, 2025

      • reosarevok[m]
        But if matching that with 1999-??-09 it still gives me "match 1 1999, match 2 09" and skips the ?? entirely
      • 2025-09-25 26827, 2025

      • reosarevok[m]
        Am I being an idiot?
      • 2025-09-25 26835, 2025

      • kellnerd[m]
      • 2025-09-25 26830, 2025

      • kellnerd[m]
        Ah, there is a path which allows "-??-" as a non-word seprator between year and "month".
      • 2025-09-25 26812, 2025

      • kellnerd[m]
        So you have to exclude "?" from "\W" or use a more specific separator pattern.
      • 2025-09-25 26803, 2025

      • kellnerd[m]
        * So you have to exclude "?" from "\\W" or use a more specific separator pattern reosarevok.
      • 2025-09-25 26855, 2025

      • reosarevok[m]
        Oh, thanks, I'll try that
      • 2025-09-25 26810, 2025

      • mayhem has quit
      • 2025-09-25 26838, 2025

      • irimi1 has quit
      • 2025-09-25 26842, 2025

      • kilos_ has quit
      • 2025-09-25 26845, 2025

      • kuno has quit
      • 2025-09-25 26847, 2025

      • irimi1 joined the channel
      • 2025-09-25 26850, 2025

      • RetroPunk has quit
      • 2025-09-25 26854, 2025

      • kilos_ joined the channel
      • 2025-09-25 26856, 2025

      • kuno joined the channel
      • 2025-09-25 26859, 2025

      • alastairp has quit
      • 2025-09-25 26804, 2025

      • rozlav82 has quit
      • 2025-09-25 26804, 2025

      • mayhem joined the channel
      • 2025-09-25 26810, 2025

      • alastairp joined the channel
      • 2025-09-25 26830, 2025

      • ursa-major has quit
      • 2025-09-25 26840, 2025

      • sbaildon has quit
      • 2025-09-25 26847, 2025

      • nawcom has quit
      • 2025-09-25 26805, 2025

      • nawcom joined the channel
      • 2025-09-25 26823, 2025

      • sbaildon joined the channel
      • 2025-09-25 26834, 2025

      • rozlav82 joined the channel
      • 2025-09-25 26843, 2025

      • RetroPunk joined the channel
      • 2025-09-25 26843, 2025

      • ursa-major joined the channel