private boolean matchAgainstPattern(String testString, Pattern patternToBeMatched) {
        boolean matchesPattern = patternToBeMatched.matcher(testString).matches();

        //is it included in exceptions:
        if (matchesPattern && exceptions != null) {
            for (WildcardMatcher exception : exceptions) {
                if (exception.match(testString)) {
                    if (printDebugs) log.debug(String.format("An exception to a restriction (%s of rule %d) matched %s.", wildcardString, ruleNo, testString));
                    return false;
                }
            }
        }

        return matchesPattern;
    }