code: function matchTabWindow(tabWindow, searchExp) {
    var itemMatches = tabWindow.tabItems.map(function (ti) {
      return matchTabItem(ti, searchExp);
    }).filter(function (fti) {
      return fti !== null;
    });
    var titleMatches = tabWindow.title.match(searchExp);
  
    if (titleMatches === null && itemMatches.count() === 0) {
      return null;
    }
  
    return FilteredTabWindow({ tabWindow: tabWindow, titleMatches: titleMatches, itemMatches: itemMatches });
  }
docs: Match a TabWindow using a Regexp
  
   matching tab items