Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Weekly Challenges

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

echuong
8 - Asteroid

A little rusty using Regex

joemkcarr
8 - Asteroid

Great challenge

hanykowska
11 - Bolide

glad this one is over...

Hannah_Lissaman
11 - Bolide

This was a tough one! 

 

I actually ended up deciding not to match completely with the output file, because I believe that a few of the phone numbers in that output have accidentally been left appended to addresses, and I have been able to separate these out. 

myastarling
10 - Fireball

oh my freakin' G this challenge was brutal for me, and my solution is not pretty. I was able to get everything to mesh but for *one* misidentifed address. I looked at the solution and I think this would have been easier for me if I had not separated out the phone number processing before everything else. But this was good RegEx practice I must say.

JORGE4900
8 - Asteroid

This was a pretty difficult challenge; some of the fields are easy to parse with the regex tool, but some other ones are more complicated. The very easy fields to parse were the notes, web address, and fax; however, the telephone number had way too many formats to capture such as 1-800 Flowers and DialWord. eg: (\d{3}[-. ]\d{3}[-. ]\d{4}|\d-\d{3}-DialWord|\d-\d{3}-Flowers)

 

It would take a lot longer to identify all the possible formats and include them in the regex tool. The same goes for the address field.

 

Spoiler
2019-06-25_16-04-59.jpg
mpennington
11 - Bolide

Wow, this one was challenging.  Just when I think I have RegEx nailed down.  

 

 

Spoiler
Challenge 20 MP.png

My RegEx for the Address and Phone Extraction (part I thought was the most challenging):  (^.+\s+)(\d{3}[-]\d{3}[-]\d{4}.*|1-\d{3}[-]\d{3}[-]\d{4}.*)

 

 

 

 

Johnny_Analytics
8 - Asteroid
Spoiler
Challenge_20_solution.png
CapriceW
8 - Asteroid

Here goes!

Cosmin_S
8 - Asteroid

I took some inspiration from other solutions to solve this challenge.

Thank you.