code: public Rule getMatchingRule(String surt, Date captureDate,
              Date retrievalDate, String who) {
  
          NewSurtTokenizer tok = new NewSurtTokenizer(surt);
          
          // Best general rule (when accessGroup is blank)
          Rule ruleGeneral = null;
  
          for (String key: tok.getSearchList()) {
              Iterable<Rule> rules = rulemap.get(key); 
              if (rules != null) {
                  for (Rule rule : rules) {
                      if (rule.matches(surt, captureDate, retrievalDate, who)) {
                      	// Return this if accessGroup (who) matches exactly
                      	if ((who != null) && who.equals(rule.getWho())) {
                      		return rule;
                      	// otherwise, store the first/best one
                      	} else if (ruleGeneral == null) {
                      		ruleGeneral = rule;
                      	}
                      }
                  }
              }
          }
          
          return ruleGeneral;
      }
docs: Return the most specific matching rule for the given request.
  
  @param surt
  @param captureDate
  @param retrievalDate
  @param who
  group
  @return