src/main/java/org/jmxtrans/agent/util/StringUtils2.java
public static void appendEscapedNonAlphaNumericChars(@Nonnull String str, @Nonnull StringBuilder result) {
        appendEscapedNonAlphaNumericChars(str, true, result);
    }
public static void appendEscapedNonAlphaNumericChars(@Nonnull String str, @Nonnull StringBuilder result) {
        appendEscapedNonAlphaNumericChars(str, true, result);
    }
Escape all non 'a' to 'z','A' to 'Z', '0' to '9' and '-' with a '_'.

@param str    the string to escape
@param result the {@linkplain StringBuilder} in which the escaped string is appended