Hi i want to validate a string with in which only numbers are allowed and only one # sign at
the end.I use this but it allow double # sign at end.
/^[0-9]+#/
How i can refine it to only allow single # sign at end of string like 1345#
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.
Don’t use
^and$. Use\Aand\zinstead! It’s a big gotcha!^and$are used to specify the end of the LINE, not sting!I hope it’ll help someone else!