title: python regular expression not matching file contents with re.match and re.MULTILINE flag
body: <p>I'm reading in a file and storing its contents as a multiline string.  Then I loop through some values I get from a django query to run regexes based on the query results values.  My regex seems like it should be working, and works if I copy the values returned by the query, but for some reason isn't matching when all the parts are working together that ends like this</p>
  
  <p>My code is:</p>
  
  <pre><code>with open("/path_to_my_file") as myfile:
      data=myfile.read()
  
  #read saved settings then write/overwrite them into the config
  items = MyModel.objects.filter(some_id="s100009")
  for item in items:
      regexString = "^\s*"+item.feature_key+":"
  
      print regexString #to verify its what I want it to be, ie debug
      pq = re.compile(regexString, re.M)
  
      if pq.match(data):
          #do stuff
  </code></pre>
  
  <p>So basically my problem is that the regex isn't matching.  When I copy the file contents into a big old string, and copy the value(s) printed by the <code>print regexString</code> line, it does match, so I'm thinking theres some esoteric python/django thing going on (or maybe not so esoteric as python isnt my first language).  </p>
  
  <p>And for examples sake, the output of <code>print regexString</code> is :</p>
  
  <p><code>^\s*productDetailOn:</code></p>
  
  <p>File contents:</p>
  
  <pre><code>    productDetailOn:true,
      allOff:false,
      trendingWidgetOn:true,
      trendingWallOn:true,
      searchResultOn:false,
      bannersOn:true,
      homeWidgetOn:true,
  }
  </code></pre>
  
  <p>Running Python 2.7.  Also, dumped the types of both item.feature and data, and both were unicode.  Not sure if that matters?  Anyway, I'm starting to hit my head off the desk after working this for a couple hours, so any help is appreciated.  Cheers!</p>