Dear Alex, Here are the changes I made to CmsStaticExport. The lines I added are tagged with "IVAN", then there is my "replace" method which I use to do the replacements of the substrings. public static String handleDynamicRules(CmsObject cms, String link, int modus, Vector paramterOnly){ // first get the ruleset link = replace (link, "#", "___"); // IVAN Handle problems with internal anchors (#) Vector dynRules = null; Vector nameRules = null; if(modus == C_MODUS_EXTERN){ dynRules = m_dynamicExportRulesExtern; nameRules = m_dynamicExportNameRulesExtern; }else{ dynRules = m_dynamicExportRulesOnline; nameRules = m_dynamicExportNameRules; } String retValue = link; int count; StringBuffer result = null; boolean doTheParameter = false; if(dynRules != null){ for(int i=0; i * @param aString:String * The original string. *

* @param aOldSubstring:String * The substring within the original string * that is to be replaced. *

* @param aNewSubstring:String * The replacement substring. *

* @return :String * - The new string with the specifed replacements * made. */ /*====================================================================*/ public final static String replace ( String aString, String aOldSubstring, String aNewSubstring ) { /*============================================================*/ /* Substring to be replaced is null - return original string */ /*============================================================*/ if ((aOldSubstring == null) || (aOldSubstring.length () == 0)) { return (aString); } /*============================================================*/ /* Substring to be replaced not found */ /*============================================================*/ int myStartIndex = 0; int myEndIndex = aString.indexOf (aOldSubstring); if (myEndIndex < 0) { return (aString); } int myOldLength = aString.length (); /*============================================================*/ /* Iteratively replace each occurrence of the substring */ /*============================================================*/ StringBuffer myStringBuffer = new StringBuffer (myOldLength); while (myEndIndex >= 0) { myStringBuffer.append (aString.substring (myStartIndex, myEndIndex)); myStringBuffer.append (aNewSubstring); myStartIndex = myEndIndex + aOldSubstring.length (); if (myStartIndex >= myOldLength) { break; } myEndIndex = aString.indexOf (aOldSubstring, myStartIndex); } /*====================================================*/ /* Add the remaining part of the original string */ /*====================================================*/ if (myStartIndex < myOldLength) { myStringBuffer.append (aString.substring (myStartIndex)); } /*============================================================*/ /* Return the appropriately modified string */ /*============================================================*/ return (myStringBuffer.toString ()); }