I need to determine if a text is an email address, or mobile number, for email address I can use some regular expression, for mobile number I can check if the string has only digits(right?)
and the sequence is like:
is (regex_valid_email(text))
{
// email
}
else if (all_digits(text))
{
// mobile number
}
but how do I check if a string has only numbers in iOS?
Thanks