anchor.diff:     end else begin
       result:=NewNode(ntBACKREFERENCE,nil,nil,nil,Value);
      end;
  -   result^.Group:=-1;
  -   result^.Name:=Name;
  +   result^.Group:=Group;
  +  end;
  + end;
  + function NewBackReferencePerName(const Name:ansistring):PFLRENode;
  + var Start,Index,Value:longint;
  +     Minus:boolean;
  + begin
  +  result:=nil;
  +  if (length(Name)>0) and (Name[1]='-') then begin
  +   Minus:=true;
  +   Start:=2;
  +  end else begin
  +   Minus:=false;
  +   Start:=1;
  +  end;
  +  Value:=-1;
  +  for Index:=Start to length(Name) do begin
  +   if Name[Index] in ['0'..'9'] then begin
  +    if Index>Start then begin
  +     Value:=Value*10;
  +    end else begin
  +     Value:=0;
  +    end;
  +    inc(Value,byte(ansichar(Name[Index]))-byte(ansichar('0')));
  +   end else begin
  +    Value:=-1;
  +    break;
  +   end;
  +  end;
  +  if Value>=0 then begin
  +   if Minus then begin
  +    Value:=CountCaptures-Value;
  +    if (Value>=0) and (Value<CountCaptures) then begin
  +     result:=NewBackReferencePerIndex(CountCaptures-Value);
  +    end else begin
  +     raise EFLRE.Create('Syntax error');
  +    end;
  +   end else begin
  +    result:=NewBackReferencePerIndex(Value);
  +   end;
  +  end else begin
  +   if (NamedGroupStringList.IndexOf(Name)<0) or (GroupNameStringStack.IndexOf(Name)>=0) then begin
  +    raise EFLRE.Create('Syntax error');
  +   end else begin
  +    Value:=CountInternalCaptures;
  +    inc(CountInternalCaptures);
  +    if rfIGNORECASE in Flags then begin
  +     result:=NewNode(ntBACKREFERENCEIGNORECASE,nil,nil,nil,Value);
  +    end else begin
  +     result:=NewNode(ntBACKREFERENCE,nil,nil,nil,Value);
  +    end;
  +    result^.Group:=-1;
  +    result^.Name:=Name;
  +   end;
     end;
    end;
    function ParseAtom:PFLRENode;
  
positive.code:            end;
             inc(SourcePosition);
             Name:='';
             while (SourcePosition<=SourceLength) and (Source[SourcePosition] in ['0'..'9','A'..'Z','a'..'z','_']) do begin
              Name:=Name+Source[SourcePosition];
              inc(SourcePosition);
             end;
  
negative.code:              '=':begin
                inc(SourcePosition);
                Name:='';
                while (SourcePosition<=SourceLength) and (Source[SourcePosition] in ['0'..'9','A'..'Z','a'..'z','_','-']) do begin
                 Name:=Name+Source[SourcePosition];
                 inc(SourcePosition);
                end;
  