use of jregex.Replacer in project cloudbreak by hortonworks.
the class AccountTelemetryService method testRulePatterns.
public String testRulePatterns(List<AnonymizationRule> rules, String input) {
String output = input;
for (AnonymizationRule rule : rules) {
String decodedRule = new String(Base64.getDecoder().decode(rule.getValue().getBytes()));
Pattern p = createAndCheckPattern(decodedRule);
Replacer replacer = p.replacer(rule.getReplacement());
output = replacer.replace(output);
}
return output;
}
Aggregations