This regex currently accept dot at the end of nameserver. What I need is: ns1.test.com. and ns1.test.com is accepted but not ns1.test.com..
var re = /^([a-z0-9][a-z0-9-]*\.)+[a-z]{2,3}\.$/i;
Help me please. Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The optional operator is, a
?.So just make the regex: