code: protected String rewriteContentString(String originalContent) {
  
          Pattern uuidPattern = Pattern.compile(CmsUUID.UUID_REGEX);
          I_CmsRegexSubstitution substitution = new I_CmsRegexSubstitution() {
  
              public String substituteMatch(String text, Matcher matcher) {
  
                  String uuidString = text.substring(matcher.start(), matcher.end());
                  CmsUUID uuid = new CmsUUID(uuidString);
                  String result = uuidString;
                  if (m_translationsById.containsKey(uuid)) {
                      result = m_translationsById.get(uuid).getStructureId().toString();
                  }
                  return result;
              }
          };
          return CmsStringUtil.substitute(uuidPattern, originalContent, substitution);
      }
docs: Replaces structure ids of resources in the source subtree with the structure ids of the corresponding
  resources in the target subtree inside a content string.<p>
  
  @param originalContent the original content
  
  @return the content with the new structure ids