code: function matchAll(exp, text) {
      exp.lastIndex = 0;
      var matches = [];
      var match;
      while ((match = exp.exec(text)) != null) {
          matches.push(match[0]);
      }
      return matches;
  }
docs: Matches all occurences of an expression in a string.