나는 이메일 세트를 텍스트 파일에 가지고있다. 나는 그것에서 몸을 추출하고 싶다. 샘플 문서는 다음과 같습니다.이메일의 텍스트 마이닝
Email: 1
===============
MIME-Version: 1.0
Received: by 10.68.8.6 with HTTP; Sat, 7 Apr 2012 01:04:45 -0700 (PDT)
Date: Sat, 7 Apr 2012 13:34:45 +0530
Delivered-To: [email protected]
Message-ID: <[email protected]om>
Subject: hello
From: twisty princess <[email protected]>
To: twisty princess <[email protected]>
Content-Type: multipart/alternative; boundary=047d7b33d826e6762004bd1239b5
--047d7b33d826e6762004bd1239b5
Content-Type: text/plain; charset=ISO-8859-1
hey How are you doing?
--047d7b33d826e6762004bd1239b5
Content-Type: text/html; charset=ISO-8859-1
<br><br>hey How are you doing?<br>
--047d7b33d826e6762004bd1239b5--
그래서이 텍스트에서 "어떻게 지내세요?"라고 말하면됩니다. 정규식과 C#을 사용하여이 작업을 수행하고 싶습니다. 감사합니다
하나의 텍스트 파일과 이러한 섹션이 여러 개 있습니까? 모든 전자 메일이 대칭/동일한 형식을 따르고 있습니까? Email : 1 및 텍스트 파일의 이중선 구분 기호 또는 SO에 삽입 했습니까? –
예 모든 전자 메일의 형식이 동일합니다. – Cyang