// and mark the result as not valid
if(name.indexOf(textFilters[j]) == -1) {
// double check against reg-expr if exists
Pattern p = textFilterPatterns[j];
if ( p == null || !p.matcher( name ).find()){
valid = false;
break;
}
}
}
//if invalid after name check, let's get to the next result
if(!valid) {
continue;
}
for(int j = 0 ; j < excludeTextFilters.length ; j++) {
//If one of the text filters do not match, let's not keep testing the others
// and mark the result as not valid
if(name.indexOf(excludeTextFilters[j]) != -1) {
valid = false;
break;
}else{
Pattern p = excludeTextFilterPatterns[j];
if ( p != null && p.matcher( name ).find()){
valid = false;
break;
}
}
}