Pergunta de entrevista da empresa IBM

Write a function to parse an incoming URL string and validate it