valid user input which begins with nine digits and ends with x or v
regex = /^[0-9-+]+$/
i write above Regex for valid only nine numbers.but i want to valid number
which end with x or v.that means every user input should have x or v at
the end.i tried the following code to do that.it only valid the weather
the input begins with 9 digits.
var flag = regex.test(nic) && nic.length == 10;
No comments:
Post a Comment