I want to use regex in my android application to validate some field.
User Name :
1Capital Letter[A-Z],2digit[0-9],1Special Character any and then followed by small character[a-z] and lenth would be10character max.
Email Address :
Must contain @google.com in last
Mobile :
Must be +91 and after that 10 digit.
How can I form my regex pattern for all three fields..?
Regx for emailid:
^[A-Za-z][A-Za-z0-9]*([._-]?[A-Za-z0-9]+)@[A-Za-z].[A-Za-z]{0,3}?.[A-Za-z]{0,2}$
accepts values as:
n etc
Regex for Mobile No:
^[7-9][0-9]{9}$
works perfect for indian mobile numbers.
Regex for landline No:
^[0-9]{3,5}-[2-9]{1}[0-9]{5,7}$
for landline numbers in india with region code
eg: 022-58974658