$ ./guess_the_languageRegex
Regex · medium · #34

What does this expression return?

'x1 y2 x3'.match(/(?<!x)\d/g)
  1. ['2']
  2. ['1', '3']
  3. ['1', '2', '3']
  4. ['y2']
The negative lookbehind (?<!x) skips digits that come right after an "x".
Play Regex ▸