0

I came across the someone's password validate code, I tried to understand this regex but I cannot.

/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,}/

I especially don't get the part

(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])

(?=) what is this for and why are there 3 groups of them prior to [a-zA-Z0-9]?

norixxx
  • 2,549
  • 2
  • 19
  • 26

0 Answers0