<?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[regcomp Pattern]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich versuche einen Ordner mit allen Datien, die dem Muster:<br />
<em>@</em>,<em>,</em>.ps entsprechen zu finden.</p>
<p>Dafür verwende ich regcomp</p>
<pre><code class="language-cpp">if (regcomp(&amp;spattern, &quot;@.*.ps&quot;, REG_EXTENDED)) {
  cout &lt;&lt; &quot;Fehler &quot;&lt;&lt;endl;
</code></pre>
<p>Sicherlich stimmt das Pattern &quot;@.*.ps&quot; nicht wirklich..<br />
Irgendwie wird mir aber unter <a href="http://www.manpagez.com/man/7/re_format/" rel="nofollow">http://www.manpagez.com/man/7/re_format/</a> nichts wirklich klarer zur korrekten Verwendung.<br />
Hat jemand einen Tipp für eine gute Erläuterung zu diesem Thema bzw. kurzfristig, eine vernüftige Pattern anstelle von meiner?</p>
<p>Danke Tim</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/227291/regcomp-pattern</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 03:59:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/227291.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Nov 2008 12:54:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 12:54:47 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich versuche einen Ordner mit allen Datien, die dem Muster:<br />
<em>@</em>,<em>,</em>.ps entsprechen zu finden.</p>
<p>Dafür verwende ich regcomp</p>
<pre><code class="language-cpp">if (regcomp(&amp;spattern, &quot;@.*.ps&quot;, REG_EXTENDED)) {
  cout &lt;&lt; &quot;Fehler &quot;&lt;&lt;endl;
</code></pre>
<p>Sicherlich stimmt das Pattern &quot;@.*.ps&quot; nicht wirklich..<br />
Irgendwie wird mir aber unter <a href="http://www.manpagez.com/man/7/re_format/" rel="nofollow">http://www.manpagez.com/man/7/re_format/</a> nichts wirklich klarer zur korrekten Verwendung.<br />
Hat jemand einen Tipp für eine gute Erläuterung zu diesem Thema bzw. kurzfristig, eine vernüftige Pattern anstelle von meiner?</p>
<p>Danke Tim</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1614082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614082</guid><dc:creator><![CDATA[Tim.2001]]></dc:creator><pubDate>Thu, 13 Nov 2008 12:54:47 GMT</pubDate></item><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 12:56:13 GMT]]></title><description><![CDATA[<p>achso eine Beispieldatei würde heissen:<br />
<strong>ab@cde,fgh,<a href="http://ijk.ps" rel="nofollow">ijk.ps</a></strong></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1614084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614084</guid><dc:creator><![CDATA[Tim.2001]]></dc:creator><pubDate>Thu, 13 Nov 2008 12:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 12:58:55 GMT]]></title><description><![CDATA[<pre><code>.*@.*,.*,.*\.ps
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1614087</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614087</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Thu, 13 Nov 2008 12:58:55 GMT</pubDate></item><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 13:00:22 GMT]]></title><description><![CDATA[<p>Zwei Sachen verstehe ich nicht:</p>
<ol>
<li>Wenn du dein Problem mit Wildcards darstellen kannst, nehm doch einfach einen Wildcard-Vergleich.</li>
<li>Warum programmierst du hier plattformabhängig? Regex-Krams gibt's z.B. auch unter Boost, dann bist du nicht auf POSIXe festgenagelt.</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/1614088</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614088</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Thu, 13 Nov 2008 13:00:22 GMT</pubDate></item><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 13:13:37 GMT]]></title><description><![CDATA[<p>Danke für die Antworten, mir war nicht ganz bewusst, dass POSIX plattformabhängig ist, ich dachte es sei genau umgekehrt.<br />
Mir geht es gerade um Unabhängigkeit, da es unter SunOS (Unix) und Linux vor allem laufen soll.<br />
Wie sieht dass ganze denn unter Boost bzw. Wildcard Vergleich aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1614099</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614099</guid><dc:creator><![CDATA[Tim.2001]]></dc:creator><pubDate>Thu, 13 Nov 2008 13:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to regcomp Pattern on Thu, 13 Nov 2008 13:24:42 GMT]]></title><description><![CDATA[<p>Tim.2001 schrieb:</p>
<blockquote>
<p>Danke für die Antworten, mir war nicht ganz bewusst, dass POSIX plattformabhängig ist, ich dachte es sei genau umgekehrt.</p>
</blockquote>
<p>Ne, POSIX ist zwar ein Standard, wird aber von einigen Unix-Derivaten und Windows nur teilweise unterstützt (siehe auch <a href="http://de.wikipedia.org/wiki/Posix" rel="nofollow">Wikipedia</a>).<br />
Wenn deine Software definitiv nur unter SunOS und Linux laufen soll und die Funktion &quot;regcomp&quot; von beiden unterstützt wird, ist es natürlich nicht verkehrt, sie auch zu benutzen. Mit plattformabhängigkeit baut man sich sonst aber oft Steine in den Weg.</p>
<p>Tim.2001 schrieb:</p>
<blockquote>
<p>Wie sieht dass ganze denn unter Boost bzw. Wildcard Vergleich aus?</p>
</blockquote>
<p>Für boost siehe <a href="http://www.onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html?page=2" rel="nofollow">hier</a>.<br />
Für Wildcard-Vergleiche googelst du kurz nach &quot;Wildcard match&quot;, da gibt's genug Algorithmen (z.B. <a href="http://xoomer.alice.it/acantato/dev/wildcard/wildmatch.html" rel="nofollow">hier</a>).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1614114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1614114</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Thu, 13 Nov 2008 13:24:42 GMT</pubDate></item></channel></rss>