Difference between two different regex lines

18 Views Asked by At
pwRegex = /^\D(?=.{5})(?=\w*\d{2})/;

pwRegex = /^\D(?=.{5})(?=\d{2})/;

why does the second line not return true for

console.log(pwRegex.test('astro22'));
0

There are 0 best solutions below