title: Python regular expression (is it possible to shorten it?)
body: <p>I am trying to parse the input file which has thousands of lines of text in the form </p>
  
  <pre class="lang-none prettyprint-override"><code>[month/day/year hh:mm:ss AM/PM] FirstName1 LastName1: text.... 
  
  [month/day/year hh:mm:ss AM/PM] FirstName2 LastName2: text....
  </code></pre>
  
  <p>I need to remove text between the brackets, <code>FirstName</code> and <code>LastName</code>, and leave only the <code>text</code> part. I did it the brute force way, but I am sure there is a more elegant way:</p>
  
  <pre><code>with open('inputfile.txt') as fin, open('file-out.txt','w') as fout:
      for line in fin:
          fout.write(re.sub('(\[[^)]*\])+(\sFirstName1 LastName1|\sFirstName2 LastName2)', '',line))
  </code></pre>
  
  <p>Is there a way to shorten this regexp (such as use only first 2 letters of the name and last 2 letters of last name or something else?). I haven't used regular expressions a lot, so any advice would be appreciated.</p>