title: Remove all entries except specific words using notepad ++
body: <p>I have a text file that contains ID's that I need to retain. The file also contains a lot of other data that I need to remove, however it is not in delimited or fixed width format. So I was wondering if there was a way to use the find/replace function in Notepad++ to remove everything except for the IDs? The  ID numbers themselves start with GO (<code>GO:000382</code> for example). I've tried to implement the advice <a href="https://stackoverflow.com/questions/14884541/regex-replace-all-but-for-notepad-v6-3?rq=1">here</a></p>
  
  <p>without success, however I'm not sure that I'm implementing correctly. I'm using the replace function </p>
  
  <pre><code>find = ^.*GO ([0-9] +).*$ and replace =  \1. 
  </code></pre>
  
  <p>Any help would be most appreciated.</p>
  
  <p>The data looks like this </p>
  
  <pre><code>GO:0043894  :   acetyl-CoA  synthetase  acetyltransferase   activity    [show   def]
  Query   matches synonym "Pat    enzyme" [exact  synonym]
  
  molecular   function
  
  8821    gene    products
  view    in  tree
  GO:0019899  :   enzyme  binding [show   def]    molecular   function
  
  240 gene    products
  view    in  tree
  GO:0000307  :   cyclin-dependent    protein kinase  holoenzyme  complex [show   def]
  Query   matches synonym "CDK    holoenzyme" [exact  synonym]
  </code></pre>
  
  <p>what I'd like back would be </p>
  
  <pre><code>GO:0043894
  GO:0019899
  GO:0000307
  </code></pre>