전자 메일 헤더의 참조 필드 뒤에 전자 메일 주소를 찾는 정규 표현식을 만들려고합니다. 필자는 문자열에 대한 프로그래밍 제어가 없으므로 특정 프로그래밍 언어에만 국한되지 않습니다. 문자열이 경우 내가 좋은 작품 정규 표현식을 만든문자열의 전자 메일 주소를 찾을 수있는 정규 표현식
Received: by hermit.cdu-staff.local
id <[email protected]>; Thu, 9 Feb 2012 13:57:14 +0930
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01CCE6E3.19910AB8"
Content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.5
Subject: Email header example
Date: Thu, 9 Feb 2012 13:57:10 +0930
Message-ID: <[email protected]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Email header example
Thread-Index: Aczm4xa7dGVpHUWERSSOuR8HCNmrAw==
From: "Bishnu Paudel" <[email protected]>
To: "Study" <[email protected]>
Cc: "Cameron Loudon" <[email protected]>
: 그것은
이메일 헤더는 다음과 같습니다 검색 조건의 일부 정규 표현식을 기대하고 일부 소프트웨어의 통합의 단지 부분 한 줄의 문자열 (헤더의 마지막 줄). 다음은 표현식입니다.
(^|,)\s*.*Cc:.*(bishnu.paudel|cameron.loudon)@company[.]com\s*($|,).
도움이 될만한 내용이 있으면 감사하겠습니다.
HI, 나는 마침내 정규 표현식을 구성하여 작업을 얻었다. ** Cc :. * <(student.admin | study | summer | midyear | changeyourworld) @ourcompany [.] com> ** 예 : 헤더와 일치 _To : <[email protected]> Cc : "studentadmin" [email protected]>, \t "Bishnu Paudel"<[email protected]> _ 그러나 대상 전자 메일 (student.admin)이 첫 번째 위치에 있지 않은 헤더와 일치하지 않습니다. 참조 필드 예 : _To : <[email protected]> 참조 : "Bishnu Paudel"<[email protected]>, \t "studentadmin"<[email protected]> _ –