check if string could be a number using regular expressions