title: sed / awk - remove all but a specific matching pattern from a file
body: <p>I want to convert a makefile like this:</p>
  
  <pre><code>test.o: var_one.h var_two.h
  
  test2.o: another_header.h var_three.h archive/something_random.h
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>test.o: var_one.h var_two.h
  
  test2.o: var_three.h
  </code></pre>
  
  <p>ie, I want to remove any filename that doesn't start with the search string "var_" </p>
  
  <p>I can't seem to find a lot of information for sed about pattern matching when not wanting the search string?</p>