Avatar of Lia Nungaray
Lia Nungaray
Flag for United States of America asked on

How to enter Regex code

What is the code in regex to ensure user enters a minimum of 6 digits and a maximum of 6 digits? I currently have

\d{6,6}

But I don't get the error message indicating that I have entered more than 6 digits.
Regular Expressions

Avatar of undefined
Last Comment
Lia Nungaray

8/22/2022 - Mon
Dr. Klahn

Do you require leading zero suppression, i.e., is 000005 as valid a number as 472625?
ASKER CERTIFIED SOLUTION
Terry Woods

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Lia Nungaray

ASKER
No, just 6 digits, 0 - 9, leading zeros included. Thanks.
Terry Woods

Did you see my solution?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Lia Nungaray

ASKER
Thanks Terry! Was on vacation for a few weeks, hadn't logged in to close.