$ ./guess_the_languageRegex
Regex · easy · #41

What does this expression return?

'"a" and "b"'.match(/".*"/)[0]
  1. '"a" and "b"'
  2. '"a"'
  3. ['"a"', '"b"']
  4. 'a" and "b'
.* is greedy: it runs to the end and backtracks only as far as the LAST quote.
Play Regex ▸