Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAI mean, I did my best. If you're looking for a lot of Regex practice, this is your one-stop shop.
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.
Took me a while as well. Was a good exercise though