finally a better regex solution