title: Python regular expression not raising exception inside header.py
body: <p>my client looks like this-></p>
  
  <pre><code>from email.mime.multipart import MIMEMultipart
  b = MIMEMultipart()
  b['a'] = "Hello"
  b['b'] = "--\nhttp://www.stallergenes.com/images/STAL_mail.png"
  b.as_string()
  </code></pre>
  
  <p>This calls a function _write_headers in generator.py</p>
  
  <p>This generator.py calls encode method in header.py</p>
  
  <p>encode function inside header.py looks like this -></p>
  
  <pre><code>def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'):
      _embedded_header = re.compile(r'\n[^ \t]+:')
      print 'value in header.py is -&gt; %s, %s, %s' %(value, type(value), _embeded_header.pattern, _embeded_header.search(value))
      if _embedded_header.search(value):
          raise HeaderParseError("header value appears to contain "
              "an embedded header: {!r}".format(value))
      return value
  </code></pre>
  
  <p>In python2.7, this is my <code>header.py</code> file inside docker container.</p>
  
  <p>Value of print statement in header.py-> --\nhttp://www.stallergenes.com/images/STAL_mail.png, \n[^ \t]+:, None</p>
  
  <p>So Basically, it should have been matched. why it is not getting matched against this regex?</p>