louis's Blog

louis's Avatar Image
Software developer #Go #CommonLisp #JS #SQL. #LispWorks user. Soft spots for #Emacs #SmallWeb. Recently becoming #OpenBSD enthusiast. #LinuxMint as a daily driver. Recovering Apple addict.

Author of the Tuner app for Linux.

Other hobbies: #Running #FireFighter #StarTrek
← All posts

With SQL, Day 1 Part 1, it’s almost too easy:

    SELECT SUM(CONCAT(REGEXP_SUBSTR(line, '[0-9]'),
                      REGEXP_SUBSTR(REVERSE(line), '[0-9]'))) AS num
    FROM day1_input;

#aoc2023 #day1 #sql #mysql

To like or reply, open original post on Emacs.ch