anchor.diff:  
   function TFLRE.PtrMatchNext(const Input:pointer;const InputLength:longint;var Captures:TFLRECaptures;const StartPosition:longint=0):boolean;
   var ThreadLocalStorageInstance:TFLREThreadLocalStorageInstance;
  +    Index:longint;
   begin
    if (StartPosition>=0) and (StartPosition<InputLength) then begin
     ThreadLocalStorageInstance:=AcquireThreadLocalStorageInstance;
     try
      ThreadLocalStorageInstance.Input:=Input;
      ThreadLocalStorageInstance.InputLength:=InputLength;
  +   if rfMULTIMATCH in Flags then begin
  +    for Index:=0 to CountMultiSubMatches-1 do begin
  +     ThreadLocalStorageInstance.MultiSubMatches[Index]:=-1;
  +    end;
  +   end;
      result:=InternalPtrMatchNext(ThreadLocalStorageInstance,Input,InputLength,Captures,StartPosition);
  +   if result and (rfMULTIMATCH in Flags) then begin
  +    SetLength(Captures,CountMultiSubMatches+1);
  +    for Index:=0 to CountMultiSubMatches-1 do begin
  +     Captures[Index+1].Start:=Index;
  +     if ThreadLocalStorageInstance.MultiSubMatches[Index]>=0 then begin
  +      Captures[Index+1].Length:=1;
  +     end else begin
  +      Captures[Index+1].Length:=0;
  +     end;
  +    end;
  +   end;
     finally
      ReleaseThreadLocalStorageInstance(ThreadLocalStorageInstance);
     end;
  
positive.code:     ThreadLocalStorageInstance:TFLREThreadLocalStorageInstance;
  begin
   result:=false;
   MatchResult:=nil;
   CountMultiCaptures:=0;
   SetLength(MultiCaptures,0);
  
negative.code: 
  function TFLRE.PtrMatch(const Input:pointer;const InputLength:longint;var Captures:TFLRECaptures;const StartPosition:longint=0):boolean;
  var ThreadLocalStorageInstance:TFLREThreadLocalStorageInstance;
      Index:longint;
  begin
   ThreadLocalStorageInstance:=AcquireThreadLocalStorageInstance;
   try
    ThreadLocalStorageInstance.Input:=Input;
    ThreadLocalStorageInstance.InputLength:=InputLength;
    if rfMULTIMATCH in Flags then begin
     for Index:=0 to CountMultiSubMatches-1 do begin
      ThreadLocalStorageInstance.MultiSubMatches[Index]:=-1;
     end;
    end;
    result:=SearchMatch(ThreadLocalStorageInstance,Captures,StartPosition,InputLength,false);
    if result and (rfMULTIMATCH in Flags) then begin
     SetLength(Captures,CountMultiSubMatches+1);
     for Index:=0 to CountMultiSubMatches-1 do begin
      Captures[Index+1].Start:=Index;
      if ThreadLocalStorageInstance.MultiSubMatches[Index]>=0 then begin
       Captures[Index+1].Length:=1;
      end else begin
       Captures[Index+1].Length:=0;
      end;
     end;
    end;
   finally
    ReleaseThreadLocalStorageInstance(ThreadLocalStorageInstance);
   end;
  