title: How can I exclude a specific string from from python regex
body: <p>I'm attempting to parse <code>/etc/mtab</code> but exclude <code>/boot</code>. I thought perhaps non-capturing groups would be the way to go, but it doesn't work as I expected. This is the regex I constructed:</p>
  
  <pre><code>proc = subprocess.Popen(["ssh", server, "cat", mtab],stdout = subprocess.PIPE)
  for line in proc.stdout:
    fsMatch = re.search(r'([\w/:]+) (/([\w/:-]+)|(?:boot)) (nfs|ext3)', line)
    if fsMatch:
      print fsMatch.group(1,2,4)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>('/dev/sda1', '/boot', 'ext3')
  ('/dev/mapper/foo1', '/export/foo1', 'ext3')
  ('/dev/mapper/foo2', '/export/foo2', 'ext3')
  ('/dev/mapper/foo3', '/export/foo3', 'ext3')
  ('/dev/mapper/foo4', '/export/foo4', 'ext3')
  ('/dev/mapper/foo5', '/export/foo5', 'ext3')
  ('servernfs:/install', '/mnt', 'nfs')
  </code></pre>
  
  <p>I'm pretty confident the <code>|</code> is wrong (and obviously more is wrong) but have hit a roadblock.</p>
  
  <p>I'm looking for all matches for <code>/[\w/:-]+</code> but exclude matches to <code>/boot</code></p>
  
  <p>Suggestions?</p>