How can I validate that a string ends with exactly three digits?
valid:
Hey-12-Therexx-111
001
xxx-5x444
invalid:
Hey-12-Therexx-1111
Hey-12-Therexx-11
Hey-12-Therexx
12
112x
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.
You can write:
which means, “start-of-string-or-non-digit-character, followed by three digits, followed by end-of-string”.