code: function getMatches(str, re) {
    if (str == null) {
      return null;
    }
    if (re == null) {
      return null;
    }
    var results = [];
    var match;
    while ((match = re.exec(str)) !== null) {
      results.push(match[1]);
    }
    return results;
  }
docs: get mateched string
  
  @param str
  @param re
  @returns {*}