Use regular expression to determine numericality.