Validate Phone Numbers

Validate Phone Numbers

BY 26 May 2015 Native Application Development

How can we validate phone numbers in Tizen native application?

I’ve tried validating a phone number in Tizen with the help of following code
 

regex_t regex;

reti = regcomp(&regex, "^((\\+91)|0?)[789]{1}\\d{9}$", 0);

reti = regexec(&regex, phoneNumber, 0, NULL, 0);

But the above code  doesn;t work for me, both the functions regcomp and regexec are giving error code number -126, can anyone tell me where the problem is?

 

Thanks.

Written by