anchor.diff:           CurrentPosition:=Next;
           end;
          end else begin
  -        if Count>=length(SplittedStrings) then begin
  -         SetLength(SplittedStrings,(Count+1)*2);
  +        if LastPosition<Captures[0].Start then begin
  +         if Count>=length(SplittedStrings) then begin
  +          SetLength(SplittedStrings,(Count+1)*2);
  +         end;
  +         SplittedStrings[Count]:=FLREPtrCopy(PFLRERawByteChar(Input),LastPosition,Captures[0].Start-LastPosition);
  +         inc(Count);
  +        end else if WithEmpty then begin
  +         if Count>=length(SplittedStrings) then begin
  +          SetLength(SplittedStrings,(Count+1)*2);
  +         end;
  +         SplittedStrings[Count]:='';
  +         inc(Count);
           end;
  -        if LastPosition<Captures[0].Start then begin
  -         SplittedStrings[Count]:=FLREPtrCopy(PFLRERawByteChar(Input),LastPosition,Captures[0].Start-LastPosition);
  -        end else begin
  -         SplittedStrings[Count]:='';
  -        end;
  -        inc(Count);
           for Index:=1 to CountCaptures-1 do begin
            if Limit<>0 then begin
             if Limit>0 then begin
              dec(Limit);
             end;
  -          if Count>=length(SplittedStrings) then begin
  -           SetLength(SplittedStrings,(Count+1)*2);
  +          if Captures[Index].Length>0 then begin
  +           if Count>=length(SplittedStrings) then begin
  +            SetLength(SplittedStrings,(Count+1)*2);
  +           end;
  +           SplittedStrings[Count]:=FLREPtrCopy(PFLRERawByteChar(Input),Captures[Index].Start,Captures[Index].Length);
  +           inc(Count);
  +          end else if WithEmpty then begin
  +           if Count>=length(SplittedStrings) then begin
  +            SetLength(SplittedStrings,(Count+1)*2);
  +           end;
  +           SplittedStrings[Count]:='';
  +           inc(Count);
             end;
  -          if Captures[Index].Length>0 then begin
  -           SplittedStrings[Count]:=FLREPtrCopy(PFLRERawByteChar(Input),Captures[Index].Start,Captures[Index].Length);
  -          end else begin
  -           SplittedStrings[Count]:='';
  -          end;
  -          inc(Count);
            end else begin
             break;
            end;
  
positive.code: 
   Flags:=AFlags;
  
   if length(RegularExpression)=0 then begin
    raise EFLRE.Create('Invalid regular expression');
   end;
  
   if rfDELIMITERS in Flags then begin
  
    StartDelimiter:=RegularExpression[1];
  
  
negative.code:        function ExtractAll(const Input:TFLRERawByteString;var MultiExtractions:TFLREMultiStrings;const StartPosition:longint=1;Limit:longint=-1):boolean;
         function Replace(const Input,Replacement:TFLRERawByteString;const StartPosition:longint=1;Limit:longint=-1):TFLRERawByteString;
         function ReplaceCallback(const Input:TFLRERawByteString;const ReplacementCallback:TFLREReplacementCallback;const StartPosition:longint=1;Limit:longint=-1):TFLRERawByteString;
         function Split(const Input:TFLRERawByteString;var SplittedStrings:TFLREStrings;const StartPosition:longint=1;Limit:longint=-1;const WithEmpty:boolean=true):boolean;
         function Test(const Input:TFLRERawByteString;const StartPosition:longint=1):boolean;
         function Find(const Input:TFLRERawByteString;const StartPosition:longint=1):longint;
  
  