title: python regex, match in multiline, but still want to get the line number
body: <p>I have lots of log files, and want to search some patterns using multiline, but in order to locate matched string easily, I still want to see the line number for matched area.</p>
  
  <p>Any good suggestion. (code sample is copied)</p>
  
  <pre><code>string="""
  ####1
  ttteest
  ####1
  ttttteeeestt
  
  ####2
  
  ttest
  ####2
  """
  
  import re
  pattern = '.*?####(.*?)####'
  matches= re.compile(pattern, re.MULTILINE|re.DOTALL).findall(string)
  for item in matches:
      print "lineno: ?", "matched: ", item
  </code></pre>
  
  <p><strong>[UPDATE] the lineno is the actual line number</strong></p>
  
  <p>So the output I want looks like:</p>
  
  <pre><code>    lineno: 1, 1
      ttteest
      lineno: 6, 2
      ttttteeeestt
  </code></pre>