js前端银行卡号(16~19)位正则验证
1 function regTest(data){ 2 var regExp = /^([1-9]{1})(\d{15}|\d{18})$/; 3 return regExp.test(data) 4 } 5 console.log('regTest(): ', test('6210812470004250007'));
1 function regTest(data){ 2 var regExp = /^([1-9]{1})(\d{15}|\d{18})$/; 3 return regExp.test(data) 4 } 5 console.log('regTest(): ', test('6210812470004250007'));