how to check if a string contains a digit