I am trying to validate a password through RegExp, in javascript, but it only returns false when in fact it should return true, for having given match in value, would anyone know if there is anything wrong with my code?
$scope.verifyPasswordIsValid = function (a , b) {
var digits_4 = new RegExp("^(\d\d)\d{0,4}$");
var seq_number = new RegExp("^1*2*3*4*3*2*1$");
var seq_alphab = new RegExp("^a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*$");
console.log("reg alp: "+seq_alphab.test(a));
console.log("reg 4: "+digits_4.test(a));
console.log("reg number: "+seq_number.test(a));
}