code: public static String getMachedLookbackTime (String datasetName, String datasetsAndLookBacks, String sysDefaultLookback) {
      String defaultLookback = sysDefaultLookback;
  
      for (String entry : Splitter.on(";").trimResults()
          .omitEmptyStrings().splitToList(datasetsAndLookBacks)) {
        List<String> datasetAndLookbackTime = Splitter.on(":").trimResults().omitEmptyStrings().splitToList(entry);
        if (datasetAndLookbackTime.size() == 1) {
          defaultLookback = datasetAndLookbackTime.get(0);
        } else if (datasetAndLookbackTime.size() == 2)  {
          String regex = datasetAndLookbackTime.get(0);
          if (Pattern.compile(regex).matcher(datasetName).find()) {
            return datasetAndLookbackTime.get(1);
          }
        } else {
          log.error("Invalid format in {}, {} cannot find its lookback time", datasetsAndLookBacks, datasetName);
        }
      }
      return defaultLookback;
    }
docs: Find the correct lookback time for a given dataset.
  
  @param datasetsAndLookBacks Lookback string for multiple datasets. Datasets is represented by Regex pattern.
  Multiple 'datasets and lookback' pairs were joined by semi-colon. A default
  lookback time can be given without any Regex prefix. If nothing found, we will use
  {@param sysDefaultLookback}.
  
  Example Format: [Regex1]:[T1];[Regex2]:[T2];[DEFAULT_T];[Regex3]:[T3]
  Ex. Identity.*:1d2h;22h;BizProfile.BizCompany:3h (22h is default lookback time)
  
  @param sysDefaultLookback If user doesn't specify any lookback time for {@param datasetName}, also there is no default
  lookback time inside {@param datasetsAndLookBacks}, this system default lookback time is return.
  
  @param datasetName A description of dataset without time partition information. Example 'Identity/MemberAccount' or 'PageViewEvent'
  @return The lookback time matched with given dataset.