title: Non greedy python regex
body: <p>I'm trying to work my way through some regular expressions; I'm using python.</p>
  
  <p>My task right now is to scrape newspaper articles and look for instances where people have died. Once I have a relevant article, I'm trying to snag the death count for some other things. I'm trying to come up with a few patterns, but I'm having difficulty with one in particular. Take this sample article section:</p>
  
  <blockquote>
    <p>SANAA, Oct 21 (Reuters) - Three men thought to be al Qaeda militants
    were killed in an apparent U.S. drone attack on a car in Yemen on
    Sunday, tribal sources and local officials said.</p>
  </blockquote>
  
  <p>The code that I'm using to snag the 'three' first does a replace on the entire document, so that the 'three' becomes a '3' before any patterns at all are applied. The pattern relevant to this example is this:</p>
  
  <pre><code>re.compile(r"(\d+)\s(:?men|women|children|people)?.*?(:?were|have been)? killed")
  </code></pre>
  
  <p>The idea is that this pattern will start with a number, be followed by an optional noun such as one of the ones listed, then have a minimum amount of clutter before finding 'dead' or 'died'. I want to leave room so that this pattern would catch:</p>
  
  <pre><code>3 people have been killed since Sunday
  </code></pre>
  
  <p>and still catch the instance in the example:</p>
  
  <pre><code>3 men thought to be al qaeda militants were killed
  </code></pre>
  
  <p>The problem is that the pattern I'm using is collecting the date from the first part of the article, and returning a count of 21. No amount of fiddling so far has enabled me to limit the scope to the digit right beside the word men, followed by the participial phrase, then the relevant 'were killed'. </p>
  
  <p>Any help would be much appreciated. I'm definitely no guru when it comes to RE.</p>