Convoy interview question

RegEx string manipulation