anchor.diff:      If (Pos(UNTitle,S)<>0)  //We may have an uploadName tiddler
          or (Pos(UURLTitle,S)<>0) //We may have an uploadURL tiddler
          or (Pos(LibModule,S)<>0) //We may need to add the config
  +       or (Pos(PasswordChk,S)<>0) //We have the section for password check
          then
       begin
         //Go ahead and do all the regex checking 
         //if woAlways was specified
         if When = woAlways then
         begin
  +        ReplaceWantPassword(S);
           ReplaceUploadName(S,When);
           ReplaceUploadURL(S,PortStr,When);
           MaybeAddSavingConfig(S,PortStr,When);
  
positive.code: 
    function UpdateWikiSavingConfig(const WikiFile: string; const OutFile: string; const Port:Integer; When: Integer): boolean;
    Const
       OVERLAP=500;
    var
      WikiS,OutS: TFileStream;
      ReadCount: LongInt;
  
negative.code:     // because the caller will deal with it
    end;
  
    procedure ReplaceWantPassword(var S:string);
    Const
      Regex = '(?s)(\$:\/core\/modules\/savers\/upload\.js&quot;: {.*?if)(\(!username \|\| username\.toString\(\)\.trim\(\) === \\&quot;\\&quot; \|\| !password \|\| password\.toString\(\)\.trim\(\) === \\&quot;\\&quot;\))';
    begin
      S := ReplaceRegExpr(Regex,S,'$1((username!==\\&quot;twexe\\&quot;) && $2)',True);
    end;
  
    //Return true if 'twexe' is found in the wiki name of 
    //the saving tab of the control panel of the wikile
    function HasTwexeUploadName(const SBuffer:string):boolean;
  