title: Python: find regexp in a file
body: <p>Have:  </p>
  
  <pre><code>f = open(...)  
  r = re.compile(...)
  </code></pre>
  
  <p>Need:<br>
  Find the position (start and end) of a first matching regexp in a big file?<br>
  (starting from <code>current_pos=...</code>)  </p>
  
  <p>How can I do this?  </p>
  
  <hr>
  
  <p>I want to have this function:  </p>
  
  <pre><code>def find_first_regex_in_file(f, regexp, start_pos=0):  
     f.seek(start_pos)  
  
     .... (searching f for regexp starting from start_pos) HOW?  
  
     return [match_start, match_end]  
  </code></pre>
  
  <p>File 'f' is expected to be big.</p>