anchor.diff:    result^.NodeType:=ntSTAR;
    end else begin
     result:=NewNode(ntQUEST,Node,nil,nil,Kind);
  + end;
  +end;
  +
  +function TFLRE.NewExact(Node:PFLRENode;MinCount,MaxCount,Kind:longint):PFLRENode;
  +var Counter:longint;
  +    OptionalNode:PFLRENode;
  +begin
  + if (MinCount>=0) and (MaxCount<0) then begin
  +  case MinCount of
  +   0:begin
  +    // x{0,} is x*
  +    result:=NewStar(StarDenull(Node),Kind);
  +   end;
  +   1:begin
  +    // x{1,} is x+
  +    result:=NewPlus(Node,Kind);
  +   end;
  +   else begin
  +    // x{2,} is xx+, x{3,} is xxx+, x{4,} is xxxx+ and so on...
  +    result:=Node;
  +    for Counter:=3 to MinCount do begin
  +     result:=Concat(result,CopyNode(Node));
  +    end;
  +    result:=Concat(result,NewPlus(CopyNode(Node),Kind));
  +   end;
  +  end;
  + end else if (MinCount=0) and (MaxCount=0) then begin
  +  // x{0,0} is nothing
  +  result:=nil;
  + end else if (MinCount=0) and (MaxCount=1) then begin
  +  // x{0,1} is x?
  +  result:=NewQuest(Node,Kind);
  + end else if (MinCount=1) and (MaxCount=1) then begin
  +  // x{1,1} is just x
  +  result:=Node;
  + end else if (MinCount>0) and (MinCount=MaxCount) then begin
  +  // x{n,m}, when where n equals to m, is n-multiple x
  +  result:=Node;
  +  for Counter:=2 to MaxCount do begin
  +   result:=Concat(result,CopyNode(Node));
  +  end;
  + end else if (MinCount>=0) and (MinCount<MaxCount) then begin
  +  // x{n,m} is n-multiple x + m-multiple x?
  +  if MinCount=0 then begin
  +   result:=nil;
  +  end else begin
  +   result:=Node;
  +   for Counter:=2 to MinCount do begin
  +    result:=Concat(result,CopyNode(Node));
  +   end;
  +  end;
  +  if MaxCount>MinCount then begin
  +   OptionalNode:=NewQuest(CopyNode(Node),Kind);
  +   for Counter:=MinCount+2 to MaxCount do begin
  +    OptionalNode:=NewQuest(Concat(CopyNode(Node),OptionalNode),Kind);
  +   end;
  +   result:=Concat(result,OptionalNode);
  +  end;
  + end else begin
  +  // Oops, this should never happen, so cases like min > max, or min < max < 0, but the parser rejects such cases.
  +  result:=Node;
  +  raise EFLRE.Create('Syntax error');
    end;
   end;
   
  
positive.code:        end;
         if (SourcePosition<=SourceLength) and (Source[SourcePosition]='}') then begin
          inc(SourcePosition);
          result:=NewNode(ntEXACT,result,nil,nil,0);
          if (SourcePosition<=SourceLength) and (Source[SourcePosition]='?') then begin
           inc(SourcePosition);
           result^.Value:=1;
           if rfLONGEST in Flags then begin
            raise EFLRE.Create('Syntax error');
           end;
          end else begin
           if rfLONGEST in Flags then begin
            result^.Value:=1;
           end else begin
            result^.Value:=0;
           end;
          end;
          result^.MinCount:=MinCount;
          result^.MaxCount:=MaxCount;
         end else begin
          raise EFLRE.Create('Syntax error');
         end;
  
negative.code:        function NewPlus(Node:PFLRENode;Kind:longint):PFLRENode;
         function NewStar(Node:PFLRENode;Kind:longint):PFLRENode;
         function NewQuest(Node:PFLRENode;Kind:longint):PFLRENode;
         function NewExact(Node:PFLRENode;MinCount,MaxCount,Kind:longint):PFLRENode;
  
         function OptimizeNode(NodeEx:PPFLRENode):boolean;
  
  