@Override
	public Map<String, String> filter(Long passwordFlags, String password) {

		Map<String, String> failReasons = new HashMap<String, String>();

		Matcher matcher = regexPattern.matcher(password);

		boolean matches = false;

		if (useFind) {
			if (matcher.find()) {
				matches = true;
			}
		} else {
			if (matcher.matches()) {
				matches = true;
			}
		}

		if (negate)
			matches = !matches;

		if (!matches) {
			failReasons.put("regex", regex);
			failReasons.put("useFind", Boolean.toString(useFind));
			failReasons.put("negate", Boolean.toString(negate));
		}

		return failReasons;
	}