title: Regular expression to find email address in a string
body: <p>I am trying to create a regular expression which will look for a email address after Cc field in the email header. I don't have programming control on the string, so its not specific to any particular programming language. It's just a part of integration of some software which expects some regular expression in a search criteria</p>
  
  <p>The email header looks like this:</p>
  
  <pre><code>Received: by hermit.cdu-staff.local 
      id &lt;01CCE6E3.19910AB8@hetmit.ere-tyumm.local&gt;; 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: &lt;6434D994F5A495428AB3B69877565EF97040C469A@hermit.cdi-stann.local&gt;
  X-MS-Has-Attach: 
  X-MS-TNEF-Correlator: 
  Thread-Topic: Email header example
  Thread-Index: Aczm4xa7dGVpHUWERSSOuR8HCNmrAw==
  From: "Bishnu Paudel" &lt;Bishnu.Paudel@company.com&gt;
  To: "Study" &lt;study@company.com&gt;
  Cc: "Cameron Loudon" &lt;Cameron.Loudon@company.com&gt;
  </code></pre>
  
  <p>I have created a regular expression which works great if the string is a one line string (the last line in the header). Here is the expression </p>
  
  <pre><code>(^|,)\s*.*Cc:.*(bishnu.paudel|cameron.loudon)@company[.]com\s*($|,).
  </code></pre>
  
  <p>Any help would greatly be appreciated.</p>