Rithum interview question

Split a String on certain conditions