code: String replaceAllWithUppercase(String input,
                  String regex,
                  int groupNumberToUppercase)
      {
          Pattern underscoreAndDotPattern = Pattern.compile(regex);
          Matcher matcher = underscoreAndDotPattern.matcher(input);
          StringBuffer sb = new StringBuffer();
          while (matcher.find())
          {
              matcher.appendReplacement(sb, matcher.group(groupNumberToUppercase).toUpperCase());
          }
          matcher.appendTail(sb);
          return sb.toString();
      }
docs: Utility method to replace all occurrences given by the specific backreference with its uppercased form, and
  remove all other backreferences.
  <p>
  The Java {@link Pattern regular expression processing} does not use the preprocessing directives <code>\l</code>,
  <code>&#92;u</code>, <code>\L</code>, and <code>\U</code>. If so, such directives could be used in the
  replacement string to uppercase or lowercase the backreferences. For example, <code>\L1</code> would lowercase
  the first backreference, and <code>&#92;u3</code> would uppercase the 3rd backreference.
  </p>
  
  @param input
  @param regex
  @param groupNumberToUppercase
  @return the input string with the appropriate characters converted to upper-case