$ ./guess_the_languageRegex
Regex · hard · #10

What does this expression return?

'aaa'.match(/a*/g)
  1. ['aaa', '']
  2. ['aaa']
  3. ['a', 'a', 'a']
  4. ['', 'aaa']
a* first consumes "aaa", then can still match the empty string at the end of the input.
Play Regex ▸