anchor.diff:            Delete(tags, i, 1);
             Break;
           end;
  -    end;
     end;
   
     //take last opened tag
  
positive.code:     sTagName: UnicodeString;
    end;
  
  procedure EditorFindHtmlTagsInText(const AText: UnicodeString; out ARes: TEditorHtmlTagsArray);
  const
    cRegexTags = '<(/?)([\w\-:]+).*?>';
  var
    obj: TRegExpr;
  begin
    SetLength(ARes, 0);
    obj:= TRegExpr.Create(cRegexTags);
  
negative.code:     obj.InputString:= AText;
      if obj.ExecPos(1) then
      repeat
        bClosing:= obj.Match[1]<>'';
        sTag:= obj.Match[2];
  
        if not AllowSingletonTags then
          if not IsTagNeedsClosingTag(sTag) then Continue;
  
        SetLength(ARes, Length(ARes)+1);
        ARes[High(ARes)].bClosing:= bClosing;
        ARes[High(ARes)].sTagName:= sTag;
      until not obj.ExecNext;
    finally
      obj.Free;
  