Regular Expressions: Positive and Negative Lookahead***

What is the problem with this? I try it with Regexr and I match every test.

^[A-Z](?=\w{5,})(?=\D*\d)$/i
  1. Your regex should use two positive lookaheads.

  2. Don’t use the g flag with test method (you can look at the documentation on the why)