title: python multiline regex
body: <p>I'm having an issue compiling the correct regular expression for a multiline match. Can someone point out what I'm doing wrong. I'm looping through a basic dhcpd.conf file with hundreds of entries such as:</p>
  
  <pre><code>host node20007                                                                                                                  
  {                                                                                                                              
      hardware ethernet 00:22:38:8f:1f:43;                                                                                       
      fixed-address node20007.domain.com;     
  }
  </code></pre>
  
  <p>I've gotten various regex's to work for the MAC and fixed-address but cannot combine them to match properly.</p>
  
  <pre><code>f = open('/etc/dhcp3/dhcpd.conf', 'r')
  re_hostinfo = re.compile(r'(hardware ethernet (.*))\;(?:\n|\r|\r\n?)(.*)',re.MULTILINE)
  
  for host in f:
  match = re_hostinfo.search(host)
      if match:
          print match.groups()
  </code></pre>
  
  <p>Currently my match groups will look like:<br>
  ('hardware ethernet 00:22:38:8f:1f:43', '00:22:38:8f:1f:43', '')</p>
  
  <p>But looking for something like:<br>
  ('hardware ethernet 00:22:38:8f:1f:43', '00:22:38:8f:1f:43', 'node20007.domain.com')</p>