title: Read and rewrite specific parts of a text file in python
body: <p>I have a text file that I want to read </p>
  
  <pre><code>-------------------
  dog: bred
  gender: male
  age: 6
  birth: july
  extra:
  -purebreed
  PRICE: list price 
  --------------------
  dog: bred
  gender: female
  age: 10
  birth: march
  extra:
  -purebreed
  PRICE: list price 
  --------------------
  dog: bred
  gender: male
  age: 2
  birth: November 
  extra:
  -purebreed
  PRICE: list price 
  --------------------
  </code></pre>
  
  <p>I have read different ways to do this but when I am trying it doesn't seem to work. I need to rewrite the file with the dashes and only the dog: and age: information. I have a lot of entries and I need to be able to only list of the dog and age of each with the dashes to separate each listing. Would I need to split based on the colon or how do I only pick out the dog and age?</p>