_preserveMatchesPseudo(selector) {
    /** @type {!Array<string>} */
    const matches = [];
    let match;
    while ((match = selector.match(MATCHES))) {
      const start = match.index;
      const end = StyleUtil.findMatchingParen(selector, start);
      if (end === -1) {
        throw new Error(`${match.input} selector missing ')'`)
      }
      const part = selector.slice(start, end + 1);
      selector = selector.replace(part, MATCHES_REPLACEMENT);
      matches.push(part);
    }
    return {selector, matches};
  }
Preserve `:matches()` selectors by replacing them with MATCHES_REPLACMENT
and returning an array of `:matches()` selectors.
Use `_replacesMatchesPseudo` to replace the `:matches()` parts

@param {string} selector
@return {{selector: string, matches: !Array<string>}}