<?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 mit RegAusdruck und allgemeine boost::regex Fragen]]></title><description><![CDATA[<p>**EDIT2:<br />
Hat sich erledigt .... hab mir selbst was gebastelt ^^<br />
**</p>
<p>Moin,<br />
ich habe momentan ein paar Probleme mit boost::regex und bräuchte da eure Hilfe.<br />
Aber vielleicht erklär ich fürs Verständnis erstmal was ich überhaupt vor hab <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Also ich habe eine eMail im eml-Textvormat. Desweiteren handelt es sich um eine MIME multi-part Mail.<br />
Ich würde gern zwei Blöcke aus der eMail extrahieren: Einmal die Nachricht im Plain Text und einmal die Nachricht als HTML.</p>
<p>So sieht jetzt eine Beispielmail aus:</p>
<pre><code>Return-Path: &lt;XXXX@gmx.de&gt;
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hostname
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE autolearn=ham
	version=3.2.5
X-Original-To: XXXX@XXXX.me
Delivered-To: XXXX@XXXX.de
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by www.XXXX.de (Postfix) with SMTP id 18CB91CED077
	for &lt;XXXX@XXXX.me&gt;; Wed,  5 Aug 2009 12:26:54 +0200 (CEST)
Received: (qmail invoked by alias); 05 Aug 2009 10:26:53 -0000
Received: from XXXX.dip.t-dialin.net (EHLO XXXX) [XXXX]
  by mail.gmx.net (mp025) with SMTP; 05 Aug 2009 12:26:53 +0200
X-Authenticated: #24602672
X-Provags-ID: V01U2FsdGVkX19krwVc8PZkC5H8E4Z0aTMFNm5aMvcMcAi0ScWMtz
	ueDGHGfSKd0fIW
Message-ID: &lt;6760F6E72974413E9FE85AF82591A8C1@wg.local&gt;
From: &quot;XXXX&quot; &lt;XXXX@gmx.de&gt;
To: &quot;XXXX&quot; &lt;XXXX@XXXX.me&gt;
Subject: Mustermail
Date: Wed, 5 Aug 2009 12:26:52 +0200
Organization: XXXX
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary=&quot;----=_NextPart_000_0100_01CA15C8.03765690&quot;
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.82,0.8100000000000001
X-Virus-Status: No
X-Virus-Checker-Version: clamassassin 1.2.4 with clamscan / ClamAV 0.95.1/9656/Wed Aug  5 05:37:12 2009

This is a multi-part message in MIME format.

------=_NextPart_000_0100_01CA15C8.03765690
Content-Type: text/plain;
	charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

Hallo XXXX,
das hier soll eine Muster-E-Mail sein, damit du mal was Ordentliches zum =
Analysieren hast ;)
Viel Erfolg,
XXXX
------=_NextPart_000_0100_01CA15C8.03765690
Content-Type: text/html;
	charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=3D&quot;text/html; charset=3Diso-8859-1&quot; =
http-equiv=3DContent-Type&gt;
&lt;META name=3DGENERATOR content=3D&quot;MSHTML 8.00.6001.18812&quot;&gt;
&lt;STYLE&gt;&lt;/STYLE&gt;
&lt;/HEAD&gt;
&lt;BODY bgColor=3D#ffffff&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;Hallo XXXX,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;das hier soll eine Muster-E-Mail sein, =
damit du mal=20
was Ordentliches zum Analysieren hast ;)&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;Viel Erfolg,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;XXXX&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;

------=_NextPart_000_0100_01CA15C8.03765690--
</code></pre>
<p>Ich dachte mir, dass ich mir im Header &quot;boundary&quot; auslese und dann so dann weitergehend die beiden Blöcke (also einmal zeile 42-46 und einmal 52-65) ermitteln könnte.</p>
<p>Leider scheitert es jetzt schon am boundary.<br />
Hatte mir als Regulären Ausrdruck</p>
<pre><code>/^\tboundary=&quot;([^&quot;]+)&quot;$/
</code></pre>
<p>überlegt aber den mag der Compiler natürlich wegen der &quot; drinnen nicht.<br />
Leider bin ich auch etwas mit der boost::regex Doku überfordert... imo etwas unübersichtlich ^^ ... naja ich finde nich wie ich denn &quot; maskieren könnte und auch nicht wirklich wie ich dann den Inhalt zwischen den &quot; &quot; bekomme ....</p>
<p>Würde mich sehr über eure Hilfestellung freuen.<br />
Vielen Danke schonmal <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>Edit:<br />
Benutze übrigens Microsoft Visual C++ Express Edition</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/247078/boost-regex-problem-mit-regausdruck-und-allgemeine-boost-regex-fragen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 19:28:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/247078.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Aug 2009 17:27:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to boost::regex - Problem mit RegAusdruck und allgemeine boost::regex Fragen on Thu, 06 Aug 2009 12:31:24 GMT]]></title><description><![CDATA[<p>**EDIT2:<br />
Hat sich erledigt .... hab mir selbst was gebastelt ^^<br />
**</p>
<p>Moin,<br />
ich habe momentan ein paar Probleme mit boost::regex und bräuchte da eure Hilfe.<br />
Aber vielleicht erklär ich fürs Verständnis erstmal was ich überhaupt vor hab <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Also ich habe eine eMail im eml-Textvormat. Desweiteren handelt es sich um eine MIME multi-part Mail.<br />
Ich würde gern zwei Blöcke aus der eMail extrahieren: Einmal die Nachricht im Plain Text und einmal die Nachricht als HTML.</p>
<p>So sieht jetzt eine Beispielmail aus:</p>
<pre><code>Return-Path: &lt;XXXX@gmx.de&gt;
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hostname
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE autolearn=ham
	version=3.2.5
X-Original-To: XXXX@XXXX.me
Delivered-To: XXXX@XXXX.de
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by www.XXXX.de (Postfix) with SMTP id 18CB91CED077
	for &lt;XXXX@XXXX.me&gt;; Wed,  5 Aug 2009 12:26:54 +0200 (CEST)
Received: (qmail invoked by alias); 05 Aug 2009 10:26:53 -0000
Received: from XXXX.dip.t-dialin.net (EHLO XXXX) [XXXX]
  by mail.gmx.net (mp025) with SMTP; 05 Aug 2009 12:26:53 +0200
X-Authenticated: #24602672
X-Provags-ID: V01U2FsdGVkX19krwVc8PZkC5H8E4Z0aTMFNm5aMvcMcAi0ScWMtz
	ueDGHGfSKd0fIW
Message-ID: &lt;6760F6E72974413E9FE85AF82591A8C1@wg.local&gt;
From: &quot;XXXX&quot; &lt;XXXX@gmx.de&gt;
To: &quot;XXXX&quot; &lt;XXXX@XXXX.me&gt;
Subject: Mustermail
Date: Wed, 5 Aug 2009 12:26:52 +0200
Organization: XXXX
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary=&quot;----=_NextPart_000_0100_01CA15C8.03765690&quot;
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.82,0.8100000000000001
X-Virus-Status: No
X-Virus-Checker-Version: clamassassin 1.2.4 with clamscan / ClamAV 0.95.1/9656/Wed Aug  5 05:37:12 2009

This is a multi-part message in MIME format.

------=_NextPart_000_0100_01CA15C8.03765690
Content-Type: text/plain;
	charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

Hallo XXXX,
das hier soll eine Muster-E-Mail sein, damit du mal was Ordentliches zum =
Analysieren hast ;)
Viel Erfolg,
XXXX
------=_NextPart_000_0100_01CA15C8.03765690
Content-Type: text/html;
	charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=3D&quot;text/html; charset=3Diso-8859-1&quot; =
http-equiv=3DContent-Type&gt;
&lt;META name=3DGENERATOR content=3D&quot;MSHTML 8.00.6001.18812&quot;&gt;
&lt;STYLE&gt;&lt;/STYLE&gt;
&lt;/HEAD&gt;
&lt;BODY bgColor=3D#ffffff&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;Hallo XXXX,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;das hier soll eine Muster-E-Mail sein, =
damit du mal=20
was Ordentliches zum Analysieren hast ;)&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;Viel Erfolg,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=3D2 face=3DArial&gt;XXXX&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;

------=_NextPart_000_0100_01CA15C8.03765690--
</code></pre>
<p>Ich dachte mir, dass ich mir im Header &quot;boundary&quot; auslese und dann so dann weitergehend die beiden Blöcke (also einmal zeile 42-46 und einmal 52-65) ermitteln könnte.</p>
<p>Leider scheitert es jetzt schon am boundary.<br />
Hatte mir als Regulären Ausrdruck</p>
<pre><code>/^\tboundary=&quot;([^&quot;]+)&quot;$/
</code></pre>
<p>überlegt aber den mag der Compiler natürlich wegen der &quot; drinnen nicht.<br />
Leider bin ich auch etwas mit der boost::regex Doku überfordert... imo etwas unübersichtlich ^^ ... naja ich finde nich wie ich denn &quot; maskieren könnte und auch nicht wirklich wie ich dann den Inhalt zwischen den &quot; &quot; bekomme ....</p>
<p>Würde mich sehr über eure Hilfestellung freuen.<br />
Vielen Danke schonmal <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>Edit:<br />
Benutze übrigens Microsoft Visual C++ Express Edition</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1755911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1755911</guid><dc:creator><![CDATA[thet]]></dc:creator><pubDate>Thu, 06 Aug 2009 12:31:24 GMT</pubDate></item></channel></rss>