code: public static String extractArguments(List<String> params, String original) {
          Matcher matcher = PARAM_SYNTAX.matcher(substringBefore(original, '#'));
          while (matcher.find()) {
              try {
                  params.add(matcher.group(1));
              } catch (Exception x) {
                  throw new IllegalArgumentException("Translation format specification", x);
              }
          }
          return matcher.replaceAll("{}");
      }
docs: Extracts specially marked arguments from a string, and returns the string with such arguments replaced with "{}".
  <ol>
  <li> Arguments are enclosed between '{' and '}'</li>
  <li> Optional extra text is allowed at the end of line starting with '#', which is removed before returning</li>
  </ol>
  
  @param params - a list to hold extracted arguments in the original string
  @param original - a text string
  @return the string with arguments replaced with "{}"