write regex solution and test