code: public static String convertToRegexString(final String input) {
          return input.replaceAll("\\\\", "\\\\").replaceAll("\\*", "\\*").replaceAll("\\+", "\\+").replaceAll("\\]", "\\]").replaceAll("\\[",
                  "\\[").replaceAll("\\(", "\\(").replaceAll("\\)", "\\)").replaceAll("\\?", "\\?").replaceAll("\\$", "\\$").replaceAll("\\|",
                  "\\|").replaceAll("\\^", "\\^").replaceAll("\\.", "\\.");
      }
docs: Converts a string so that it can be used in a regular expression.
  
  @param input The string to be converted.
  @return An escaped string that can be used in a regular expression.