title: Get list of moves from PGN
body: <p>I have a PGN (Portable Game Notation) of a chess game. What I would like is to get just a list of the moves. For example:</p>
  
  <p>PGN : </p>
  
  <pre><code>1. e4 e5 2. f4 exf4 3. Nf3 d5 4. exd5 Nf6 5. Nc3 Nxd5 6. Nxd5 Qxd5 7. d4 Bg4 8.
  Bxf4 Nc6 9. Be2 O-O-O 10. c3 Qe4 11. Qd2 Rxd4 12. Nxd4 Nxd4 13. cxd4 Bb4 14.
  Kf2 Bxd2 15. Bxg4+ f5 16. Bxd2 fxg4 17. Rhe1 Qxd4+ 18. Be3 Qxb2+ 19. Kf1 Re8
  0-1
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>['e4','e5','f4','exf4','Nf3','d5', .... , 'Re8']
  </code></pre>
  
  <p>My idea was the take the string and split it at the spaces and then arrange a new array that way, but I'm wondering if there are any better ways of doing this. There's no specific language I'm just interested in general. Could be python, javascript, doesn't really matter. </p>
  
  <p>Also, sometimes PGN comes with notation in the middle of the string or "variations" which are denoted in brackets, I'd like to ignore these. Any ideas?
  Thanks</p>