<?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[Boost.Regex Problem]]></title><description><![CDATA[<p>Ja öhm, hallo^^</p>
<p>Ich habe aufgrund der Plattform-Unabhängigkeit ein kleineres Projekt auf Boost.Regex umgestellt, wobei sich jedoch ein kleineres Problem ergeben hat.</p>
<p>Zuerst downloade ich den Quelltext einer Website, in welchem ich danach per regex nach einer nbestimmten Textpassage suche und daraus eine ID exportiere.</p>
<p>Bei der Bibliothek, die ich vorher genutzt habe, ging eine Anweisung wie</p>
<pre><code class="language-cpp">if(pcrecpp::RE(&quot;index.php\\?seite=spieler&amp;id=(\\d+)&quot;).PartialMatch(this-&gt;download(), &amp;id))
</code></pre>
<p>ohne Probleme.</p>
<p>Unter Boost macht allerdings die Anweisung</p>
<pre><code class="language-cpp">if(boost::regex_match(this-&gt;download(), what, boost::regex(&quot;index.php\\?seite=spieler&amp;id=(\\d+)&quot;)))
</code></pre>
<p>Probleme.</p>
<p>Es scheint mir so, als würde die Anweisung nur true zurückgeben, wenn der Regex sich auf den ganzen Text anwenden lässt.<br />
Dies folgere ich daraus, dass es funktioniert, wenn ich am Anfang und am Ende des Regex jeweils &quot;.+&quot; anfüge.</p>
<p>Ich vermute, dass ich als letztes Argument noch irgendwelche Flags angeben muss, ich weiß jedoch nicht welche und werde auch aus der Dokumentation nicht schlau.<br />
Probiert habe ich bereits boost::match_partial sowie match_default und ähnliche, keine hat den erwünschten Erfolg gebracht.</p>
<p>Lange Rede, kurzer Sinn: Wer weiß, wo dass Problem liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/184081/boost-regex-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 14:27:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/184081.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Jun 2007 09:33:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Boost.Regex Problem on Tue, 12 Jun 2007 09:38:17 GMT]]></title><description><![CDATA[<p>Ja öhm, hallo^^</p>
<p>Ich habe aufgrund der Plattform-Unabhängigkeit ein kleineres Projekt auf Boost.Regex umgestellt, wobei sich jedoch ein kleineres Problem ergeben hat.</p>
<p>Zuerst downloade ich den Quelltext einer Website, in welchem ich danach per regex nach einer nbestimmten Textpassage suche und daraus eine ID exportiere.</p>
<p>Bei der Bibliothek, die ich vorher genutzt habe, ging eine Anweisung wie</p>
<pre><code class="language-cpp">if(pcrecpp::RE(&quot;index.php\\?seite=spieler&amp;id=(\\d+)&quot;).PartialMatch(this-&gt;download(), &amp;id))
</code></pre>
<p>ohne Probleme.</p>
<p>Unter Boost macht allerdings die Anweisung</p>
<pre><code class="language-cpp">if(boost::regex_match(this-&gt;download(), what, boost::regex(&quot;index.php\\?seite=spieler&amp;id=(\\d+)&quot;)))
</code></pre>
<p>Probleme.</p>
<p>Es scheint mir so, als würde die Anweisung nur true zurückgeben, wenn der Regex sich auf den ganzen Text anwenden lässt.<br />
Dies folgere ich daraus, dass es funktioniert, wenn ich am Anfang und am Ende des Regex jeweils &quot;.+&quot; anfüge.</p>
<p>Ich vermute, dass ich als letztes Argument noch irgendwelche Flags angeben muss, ich weiß jedoch nicht welche und werde auch aus der Dokumentation nicht schlau.<br />
Probiert habe ich bereits boost::match_partial sowie match_default und ähnliche, keine hat den erwünschten Erfolg gebracht.</p>
<p>Lange Rede, kurzer Sinn: Wer weiß, wo dass Problem liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303779</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Tue, 12 Jun 2007 09:38:17 GMT</pubDate></item><item><title><![CDATA[Reply to Boost.Regex Problem on Tue, 12 Jun 2007 10:56:51 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>The-Kenny schrieb:</p>
<blockquote>
<p>Es scheint mir so, als würde die Anweisung nur true zurückgeben, wenn der Regex sich auf den ganzen Text anwenden lässt.</p>
</blockquote>
<p>bist schon nahe dran <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>
<p>boost schrieb:</p>
<blockquote>
<p><strong>Note that the result is true only if the expression matches the whole of the input sequence.</strong> If you want to search for an expression somewhere within the sequence then use regex_search. If you want to match a prefix of the character string then use regex_search with the flag match_continuous set.</p>
</blockquote>
<p>Das sollte selbsterklären sein ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303853</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 12 Jun 2007 10:56:51 GMT</pubDate></item><item><title><![CDATA[Reply to Boost.Regex Problem on Tue, 12 Jun 2007 11:31:01 GMT]]></title><description><![CDATA[<p>Ups, da hab ich wohl mal wieder text übersprungen -.-<br />
Muss ich mir abgewöhnen *g*</p>
<p>Danke nochmal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303881</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Tue, 12 Jun 2007 11:31:01 GMT</pubDate></item></channel></rss>