It's beginning to look a lot like...Advent of Code! Get in the holiday spirit by learning how you can participate in this friendly competition and earn a seasonal badge.

Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #20: List Parsing

StellaBon
11 - Bolide
Spoiler
RegEx, YIKES!RegEx, YIKES!

I mean, I did my best. If you're looking for a lot of Regex practice, this is your one-stop shop.

caltang
16 - Nebula

Complex but I think I got it.

 

Spoiler
image.png
DanielG
12 - Quasar

This was a rough one.

 

Solved.

 

rzdodson
11 - Bolide
Spoiler
SPOILER
danielhoge
8 - Asteroid
Spoiler
Screenshot 2023-09-18 100345.png
Tgigs
8 - Asteroid

My solution attached.

 

Wow that took a while! Took some trial and error to write the regex to handle all the cases. Not the most dynamic solution but it gets the job done effectively. Hard to think of a way to solve this problem dynamically when there are so many inconsistent formats.

 

Essentially, I used regex to return a true/false to determine if the line is company, address, phone, fax, notes, or website. From there I was able to easily find a way to manipulate the data to get it in the appropriate format.

Tgigs
8 - Asteroid

Took me a while as well. Was a good exercise though

Dani_Lin
8 - Asteroid

solved

Computernerd
8 - Asteroid

I thought I had it, then the results were slightly off. I hadn't accounted for 1- Numbers. This one was tough.

DQAUDIT
9 - Comet

Solution Attached.