public boolean regexMatchesField(String field, String boolOp, Pattern[] patterns) {
        
        if (field == null || field.isEmpty()) {
            return false;
        }
        
        boolean OR = "OR".equals(boolOp);
        boolean AND = !OR;
        boolean matchesAll = true;
        boolean matchesOne = false;
        for(int i = 0; i < patterns.length; i++) {
            boolean matches = patterns[i].matcher(field).matches();
            matchesAll = (matchesAll && matches);
            matchesOne = (matchesOne || matches);
            if( matchesOne && OR)  return true;
            if(!matchesAll && AND) return false;
        }
        
        if(AND)
            return matchesAll;
        else
            return matchesOne;
    }
Classify whether a page is relevant by matching lists of regular expressions against multiples
fields of the web page.
ache/src/main/java/achecrawler/target/classifier/RegexTargetClassifier.java