eDreams ODIGEO interview question

Make an algorithm that checked an string input for an specific format of substring