title: How to match--but not capture--in Python regular expressions?
body: <p>I've got a function spitting out "Washington D.C., DC, USA" as output. I need to capture "Washington, DC" for reasons that have to do with how I handle every single other city in the country. (Note: this is <strong>not</strong> the same as "D.C.", I need the comma to be between "Washington" and "DC", whitespace is fine)</p>
  
  <p>I can't for the life of me figure out how to capture this.</p>
  
  <p>Here's what I've tried:</p>
  
  <pre><code>    &gt;&gt;&gt;location = "Washington D.C., DC, USA"
  
      &gt;&gt;&gt;match = re.search(r'\w+\s(?:D\.C\.), \w\w(?=\W)', location).group()
      &gt;&gt;&gt;match
      u'Washington D.C., DC'
  </code></pre>
  
  <p>Is not (?: ...) supposed to just match (and not capture) "D.C."?</p>
  
  <p>Here are the 2.7.2 Docs:</p>
  
  <blockquote>
    <p>(?:...)
    A non-capturing version of regular parentheses. Matches whatever regular expression is inside the parentheses, but the substring matched by the group cannot be retrieved after performing a match or referenced later in the pattern.</p>
  </blockquote>
  
  <p>What gives??</p>
  
  <p>Thanks in advance!</p>