0

How do I detect if a string has a number and after number minimum two characters? I have a function like this:

function checkString(string){
   return !!string.match(/^ (?=.*?[A-Z]) (?=.*?[0-9]) .{8,} /);
}
asdFghjk    - false,   
asd3fGhjk   - true,  
123aSdfghjk - false,  
asd6H       - false
levininja
  • 2,562
  • 4
  • 21
  • 40
Nikola
  • 173
  • 1
  • 3
  • 12

0 Answers0