Possible bug in Regex lesson?

The challenge is a little confusing. Really, the best regex to solve it would be /a{2,}/i, or perhaps /aa+/i (match 2 or more “a”s, case insensitive), but that fails the first condition (must use the * character).

It might help to think of the challenge this way:

  • It must match at least 2 “a”s.
  • After that, it can match 0 or more “a”s (this makes no difference to how the regex functions, but is necessary to pass the first test case).
1 Like