code: public static String hyphenOptional(final String input) {
  		return input.replaceAll(HYPHEN_MINUS, HYPHEN_MINUS + "?").replaceAll(SOFT_HYPHEN, SOFT_HYPHEN + "?");
  	}
docs: Replaces both 'hyphen minus' (Unicode U+002D) and 'soft hyphen' (Unicode U+00AD) characters
  with the character itself followed by a '?'.
  
  @param input
  the string to modify
  @return the modified input string with all replacements described above