Hi I am trying to write regex but facing some issues over it. can anyone help me write one.
conditions :
• ALL 10 digits being 0 is not allowed.
• The area code (first 3 digits) cannot be the same digit,
• The 1st and 4th digit cannot be 0 or 1.
/^\({0,1}[2-9]{1}[0-9]{2}\){1} {1}[2-9]{1}[0-9]{2}-{0,1}[0-9]{0,4}$/
Example format: (234) 567-7890
The above question is different than the other ones as it focuses more on a specific conditions to fulfill with regex.