public FormatResult format(String string) {
        for (PatternRule rule : rules) {
            if (rule.getPattern().matcher(string).matches()) {
                return new FormatResult(true, string, rule.getName());
            }
        }
        return new FormatResult(false, string, string);
    }
Format the string based on rules.

@param string to be formatted
@return matched rule name, or original string.
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/StringFormatGroup.java