fix overzealous regex refactoring