<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst.]]></title><description><![CDATA[<p>Ich habe ein Link in Memo1 und den möchteich gern bearbeiten.</p>
<pre><code class="language-cpp">String text = Form1-&gt;Memo1-&gt;Text.c_str();
 String text_link = Form1-&gt;Memo1-&gt;Text.c_str();

 int pos1 = text.Pos(&quot;&lt;a href=&quot;);
 int pos2 = text.Pos(&quot;&gt;&quot;);
 String text1 = pos2;
 String text2 = text.SubString(pos1, pos2-pos1+1);
 Form1-&gt;Edit2-&gt;Text = text2.c_str();

 int pos3 = text_link.Pos(&quot;&lt;img src=&quot;);
 int pos4 = text_link.Pos(&quot;&gt;&quot;);
 String link1 = pos4;
 String link2 = text_link.SubString(pos3, pos4-pos3+1);
 Form1-&gt;Edit1-&gt;Text = link2.c_str();
</code></pre>
<p>Als erstes Link, ergebniss:</p>
<pre><code>&lt;a href=&quot;www.c-plusplus.net&quot;&gt;
</code></pre>
<p>Als zweites Bild, ergebniss:</p>
<pre><code>leer
</code></pre>
<p>Das funktioniert nicht. Habe heraus gefunden das wenn &quot;&lt;img src=&quot; in der mitte ist funktioniert das nicht, aber wenn das am anfang ist dann klappt es.<br />
Die Frage ist wie kann ich das lösen?<br />
Dank im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195565/html-link-bearbeiten-funktioniert-nicht-gt-problem-gelöst</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 09:31:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195565.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Oct 2007 03:12:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 03:48:54 GMT]]></title><description><![CDATA[<p>Ich habe ein Link in Memo1 und den möchteich gern bearbeiten.</p>
<pre><code class="language-cpp">String text = Form1-&gt;Memo1-&gt;Text.c_str();
 String text_link = Form1-&gt;Memo1-&gt;Text.c_str();

 int pos1 = text.Pos(&quot;&lt;a href=&quot;);
 int pos2 = text.Pos(&quot;&gt;&quot;);
 String text1 = pos2;
 String text2 = text.SubString(pos1, pos2-pos1+1);
 Form1-&gt;Edit2-&gt;Text = text2.c_str();

 int pos3 = text_link.Pos(&quot;&lt;img src=&quot;);
 int pos4 = text_link.Pos(&quot;&gt;&quot;);
 String link1 = pos4;
 String link2 = text_link.SubString(pos3, pos4-pos3+1);
 Form1-&gt;Edit1-&gt;Text = link2.c_str();
</code></pre>
<p>Als erstes Link, ergebniss:</p>
<pre><code>&lt;a href=&quot;www.c-plusplus.net&quot;&gt;
</code></pre>
<p>Als zweites Bild, ergebniss:</p>
<pre><code>leer
</code></pre>
<p>Das funktioniert nicht. Habe heraus gefunden das wenn &quot;&lt;img src=&quot; in der mitte ist funktioniert das nicht, aber wenn das am anfang ist dann klappt es.<br />
Die Frage ist wie kann ich das lösen?<br />
Dank im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388252</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Sat, 20 Oct 2007 03:48:54 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 06:03:01 GMT]]></title><description><![CDATA[<p>Das Problem ist das er beim zweiten suchen von &quot;&gt;&quot; auch wieder das erste findet, du mußt beim zweiten suchen, &quot;nach&quot; dem ersten vorkommen von &quot;&gt;&quot; anfangen zu suchen.</p>
<p>CU</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388267</guid><dc:creator><![CDATA[Find_&amp;gt;]]></dc:creator><pubDate>Fri, 19 Oct 2007 06:03:01 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 11:09:45 GMT]]></title><description><![CDATA[<p>tut mir leid ich weiss nicht wie ich das machen muss, sonst hätte ich nicht gefrag ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388463</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Fri, 19 Oct 2007 11:09:45 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 11:41:19 GMT]]></title><description><![CDATA[<p>Am einfachsten wohl so:</p>
<pre><code class="language-cpp">AnsiString text = Form1-&gt;Memo1-&gt;Text; // das c_str() ist überflüssig, warum erst nach char* wandeln und dann wieder nach String / AnsiString?
 AnsiString text_link;

 int pos1 = text.Pos(&quot;&lt;a href=&quot;);
 int pos2 = text.Pos(&quot;&gt;&quot;);
 AnsiString text1 = AnsiString(pos2); // geht zwar auch ohne, aber so sieht man direkt, dass hier etwas konvertiert wird
 AnsiString text2 = text.SubString(pos1, pos2 - pos1 + 1);

 Form1-&gt;Edit2-&gt;Text = text2;

 text_link = text.Delete(1, pos2); // alles bisher ausgewertete löschen

 int pos3 = text_link.Pos(&quot;&lt;img src=&quot;);
 int pos4 = text_link.Pos(&quot;&gt;&quot;);
 AnsiString link1 = AnsiString(pos4);
 AnsiString link2 = text_link.SubString(pos3, pos4 - pos3 + 1);
 Form1-&gt;Edit1-&gt;Text = link2;
</code></pre>
<p>Ich weiß nur nicht wozu text1 und link1 gut sein sollen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388484</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 19 Oct 2007 11:41:19 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 11:47:26 GMT]]></title><description><![CDATA[<p>Du mußt für die zweite Suche erst noch mittels SubString einen neuen TeilString erzeugen:</p>
<pre><code class="language-cpp">AnsiString text_link = text.SubString(pos2, text.Length() - pos2 + 1);
int pos3 = text_link.Pos(&quot;&lt;img src=&quot;);
int pos4 = text_link.Pos(&quot;&gt;&quot;);
AnsiString link2 = text_link.SubString(pos3, pos4-pos3+1);
Edit1-&gt;Text = link2; // ohne c_str() reicht
</code></pre>
<p>P.S. AnsiString und String sind intern derselbe Datentyp (in C++ sollte man AnsiString verwenden, zur besseren Unterscheidung von std::string).</p>
<p>Edit: wieder mal zu langsam</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388486</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 19 Oct 2007 11:47:26 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 12:21:19 GMT]]></title><description><![CDATA[<p>Danke leute für die Hilfe.<br />
Jetzt eine letzte sache noch?</p>
<pre><code class="language-cpp">// HTMl LINK
 int pos1 = text.Pos(&quot;&lt;a href=&quot;);
 int pos2 = text.Pos(&quot;&gt;&quot;);
 AnsiString text1 = AnsiString(pos2); // geht zwar auch ohne, aber so sieht man direkt, dass hier etwas konvertiert wird
 AnsiString text2 = text.SubString(pos1, pos2 - pos1 + 1);
 Form1-&gt;Edit2-&gt;Text = text2;

 text_link = text.Delete(1, pos2); // alles bisher ausgewertete löschen

  // Bild alt
 int pos5 = text_link.Pos(&quot;alt=&quot;);
  :arrow_right: int pos6 = text_link.Pos(&quot;&quot;);
 AnsiString alt1 = AnsiString(pos6);
 AnsiString alt2 = text_alt.SubString(pos5, pos6-pos5+1);

 // Bild
 int pos3 = text_link.Pos(&quot;&lt;img src=&quot;);
 int pos4 = text_link.Pos(&quot;&gt;&quot;);
 AnsiString link1 = AnsiString(pos4);
 AnsiString link2 = text_link.SubString(pos3, pos4 - pos3 + 1);
 Form1-&gt;Edit1-&gt;Text = link2;
</code></pre>
<p>Jetzt möchte ich das wo der Pfeil ist auch noch raus gelesen wird und vor Bild abfrage dieser teil glöschet wird? Wie kann ich das machen weil bei html code</p>
<pre><code class="language-html">alt=&quot;.....&quot;
</code></pre>
<p>und</p>
<pre><code class="language-cpp">....Pos(&quot;&quot;&quot;);
</code></pre>
<p>Falsch.<br />
Wenn das Problem gelöst ist bin ich sehr glücklich und sehr sehr Dankbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388508</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Fri, 19 Oct 2007 12:21:19 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 13:12:07 GMT]]></title><description><![CDATA[<p>Wenn du dir deine Frage jetzt nochmal durchliest, verstehst du dann eigentlich selbst noch, was da steht?</p>
<p>Ggf. wäre es einfacher, einen Beispiellink zu posten und den Abschnitt zu markieren, den du entfernen möchtest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388555</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Fri, 19 Oct 2007 13:12:07 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 13:24:25 GMT]]></title><description><![CDATA[<p>Ähh ok kann sein dass ich wieder mist geschrieben habe bin seid 24 Sutnden wach. sorry.</p>
<pre><code class="language-html">&lt;a href=&quot;http://www.xyz.de&quot;&gt;&lt;img src=&quot;www.xyz.de/xlogo.gif&quot; alt=&quot;Logo xyz&quot; width=&quot;100&quot; height=&quot;100&quot;&gt;&lt;/a&gt;
</code></pre>
<p>Jetzt will ich das so haben, dass das Ergebniss so aus sieht:</p>
<pre><code>1. http://www.xyz.de
2. www.xyz.de/xlogo.gif
3. Logo xyz
</code></pre>
<p>Und das versuch ich zu realisieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388570</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Fri, 19 Oct 2007 13:24:25 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Fri, 19 Oct 2007 16:20:23 GMT]]></title><description><![CDATA[<p>Wenn du nach dem Hochkommazeichen suchst, dann mußt du dieses maskieren:</p>
<pre><code class="language-cpp">int pos = text.Pos(&quot;\&quot;&quot;);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1388651</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388651</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 19 Oct 2007 16:20:23 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 00:54:48 GMT]]></title><description><![CDATA[<p>Habe in forum gesucht und boost regex gefunden.<br />
Dass ist das was ich gesucht habe.<br />
Aber leider Funktioniert das nicht mit Memo1 und ausgabe in edit.</p>
<pre><code class="language-cpp">boost::regex e(&quot;&lt;\\s*A\\s+[^&gt;]*href\\s*=\\s*&quot;?([^&quot; &gt;]*)&quot;,boost::regbase::normal | boost::regbase::icase);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1388782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388782</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Sat, 20 Oct 2007 00:54:48 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 04:22:35 GMT]]></title><description><![CDATA[<p>Moin!</p>
<p>Ein paar Fragen:</p>
<p>1. Kommt der Link immer in der Reihenfolge &lt;a href &gt;&lt;/a&gt; ... &lt;img...&gt; oder auch mal andersherum und ist</p>
<p>2. normaler Text dazwischen (oder s. deinen Beispiellink ?).</p>
<p>3. Das alt-Attribut im Image-Tag wird gelöscht oder ersetzt?</p>
<p>4. Was passiert am Ende der Routine mit den Tags (Abspeichern in DB oder in eine Webseite).</p>
<p>MfG<br />
kpeter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388804</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388804</guid><dc:creator><![CDATA[kpeter]]></dc:creator><pubDate>Sat, 20 Oct 2007 04:22:35 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 06:23:50 GMT]]></title><description><![CDATA[<p>Hi,<br />
alle links sehen so aus.</p>
<pre><code class="language-html">&lt;a href=&quot;http://www.c-plusplus.net&quot;&gt;
&lt;img src=&quot;http://www.c-plusplus.net/forum/templates/fisubtext/images/c-plusplusde.gif&quot; alt=&quot;c++.de&quot; /&gt;&lt;/a&gt;
</code></pre>
<p>(Alle hinetereinander, ich habe das jetzt oben so gemacht damit das nicht Über die Seite hinaus geht.)<br />
Kurz:</p>
<pre><code class="language-html">&lt;a href=&quot;..&quot;&gt;&lt;img src=&quot;..&quot; alt=&quot;..&quot; with=&quot;..&quot; (usw..) /&gt;&lt;/a&gt;
</code></pre>
<p>Das Alt wird je nach dem ersetzt, löschen nein grund:<br />
einmal: <a href="http://www.w3schools.com" rel="nofollow">http://www.w3schools.com</a><br />
zweitens: <a href="http://validator.w3.org" rel="nofollow">http://validator.w3.org</a><br />
Das Sind meine gründe.<br />
Am ende wird Fehlerfreier html seite erstellt.<br />
( Aber das teil habe ich für einen anderen Projekt (auch) gebraucht. Vorschau von Bestimmten html codes usw.... Das kann ich jetzt frei für alles verwenden.)<br />
Links, Bilder, Texte, Emails usw...</p>
<p>MFG. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388808</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388808</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Sat, 20 Oct 2007 06:23:50 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 07:06:01 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wie meinst du das:</p>
<p>titanium schrieb:</p>
<blockquote>
<p>Das Alt wird je nach dem ersetzt,</p>
</blockquote>
<p>wonach richtet sich &quot;je nach dem&quot;? Willst eine Webseite auf einen gültigen Link (toten Link)</p>
<p>checken? Frage deshalb, weil sich danach der Lösungsansatz richtet.</p>
<p>MfG<br />
kpeter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388813</guid><dc:creator><![CDATA[kpeter]]></dc:creator><pubDate>Sat, 20 Oct 2007 07:06:01 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 07:21:56 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
nein.<br />
Das</p>
<pre><code class="language-html">alt=&quot;c++.de&quot;
</code></pre>
<p>ist für die Bilder.<br />
Wenn du zum Beispiel mit der Maus auf unseren C++ Community Logo, links Oben drauf gehst siehst du das da &quot;<a href="http://c++.de" rel="nofollow">c++.de</a>&quot; kurz angezeigt wird.<br />
Das alt bezieht sich auf das Bild.Ist gleichzeitig ein ersatz wenn jemand das Bild aus sein verzeichnis löcht. Dann sieht man noch nur ein text.<br />
HTML grundkenntnisse.</p>
<p>Je nach dem möchte ich bei dem Projekt die möglichkeit geben die Begriffe (Texte) zu ändern. Ohne das ein Laye in html rumfuchtelt und die Seiten oder ein Link deaktiviert (platt macht), weil sich nicht entscheiden könnte wie er seine Bilder und Logos bennent.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388818</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Sat, 20 Oct 2007 07:21:56 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 07:27:27 GMT]]></title><description><![CDATA[<p>Schön, dass du über HTML schon so viel weisst <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Vorschlag: Ändere das alt-Tag im Memo, wenn du das eh von Hand machst.</p>
<p>MfG</p>
<p>kpeter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388822</guid><dc:creator><![CDATA[kpeter]]></dc:creator><pubDate>Sat, 20 Oct 2007 07:27:27 GMT</pubDate></item><item><title><![CDATA[Reply to html link bearbeiten funktioniert nicht. -&amp;gt; Problem gelöst. on Sat, 20 Oct 2007 07:43:33 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Ich weiss.<br />
Danke für die Info. Aber ich habe die Codes am Ende doch leider nicht verwendet.<br />
Beim Entwickeln kam ich auf boost::regex.<br />
Und das ist genaus so gut wie bei php-&gt;preg_match_all().<br />
Bin jetzt viel weiter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388826</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388826</guid><dc:creator><![CDATA[titanium]]></dc:creator><pubDate>Sat, 20 Oct 2007 07:43:33 GMT</pubDate></item></channel></rss>