Advent of Code 2024 Day 3 (BaseA Style)
Opções
- Inscrever-se no RSS Feed
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico do usuário atual
- Marcar como favorito
- Inscrever-se
- Emudecer
- Versão para impressão
AlteryxCommunityTeam
Alteryx Community Team
12-02-2024
09:03 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
Discussion thread for day 3 of the Advent of Code - https://adventofcode.com/2024/day/3
Rótulos:
- Rótulos:
- Advent of Code
73 RESPOSTAS 73
clmc9601
13 - Pulsar
12-02-2024
09:14 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
Such a relief when regex works the way I intended on the first try 😅
Saqueador
Tokenize for the win! I'm very surprised there weren't any parsing tricks... that would have been very on brand for AoC.
kelsey_kincaid
12 - Quasar
12-02-2024
09:18 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
CoG
Magnetar
12-02-2024
09:18 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
I had some trouble with my code, initially, but managed to identify and resolve the bugs I ran into quickly
gawa
16 - Nebula
12-02-2024
09:21 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
It's about 'Parse'.
Saqueador
When complicated parse is needed, Regex tool will do it perfectly.
Part1: We need to parse out all pattern mul({inetger},{integer}), but not knowing how many exist. In this case, we can use 'Tokenize' into rows.
Please be careful when regex expression includes meta characters, they must be escaped by backslash '\'.
Then, data can be further parsed into columns to extract 2 integer values.
Part2: We need to extract more patterns 'do()' and 'don't()' in addition to 'mul({integer},{integer})'. Regex can be modified to match any of those patterns by vertical bar like (pattern1|pattern2|....|pattern N)
Then, by using Multi Row Formula, we can identify which record is to be calculated.
Part1: We need to parse out all pattern mul({inetger},{integer}), but not knowing how many exist. In this case, we can use 'Tokenize' into rows.
Please be careful when regex expression includes meta characters, they must be escaped by backslash '\'.
Then, data can be further parsed into columns to extract 2 integer values.
Part2: We need to extract more patterns 'do()' and 'don't()' in addition to 'mul({integer},{integer})'. Regex can be modified to match any of those patterns by vertical bar like (pattern1|pattern2|....|pattern N)
Then, by using Multi Row Formula, we can identify which record is to be calculated.
(Edit)
Tool golf version: Part1=3 tools, Part2=3 tools
Saqueador
Formula tool is very powerful!
clmc9601
13 - Pulsar
12-02-2024
09:22 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
I love seeing the cryptic and quickly typed column names and annotations AoCers use when racing on the leaderboard. 😂 not maintainable, but so relatable and funny
AkimasaKajitani
17 - Castor
12-02-2024
09:43 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
Solved!
I should become closer friends with the RegEx tool.
Saqueador
But to simplify the regex, I used the Find Replace tool.
ScottLewis
Bólide
12-02-2024
09:51 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
The RegEx on this one was beyond my normal reach, but we got there.
One useful trick was
Saqueador
Replacing do() and don't() with single characters so you can use Parse on delimiter.
PangHC
Quasar
12-02-2024
09:56 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador
regex tools win the race today.
geoff_zath
Alteryx
12-02-2024
10:00 PM
- Marcar como novo
- Marcar como favorito
- Inscrever-se
- Emudecer
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Notificar o moderador