Help with program to remove comments from chess(pgn) text files
807600Aug 6 2007 — edited Aug 8 2007Hi
I would like to make a java program that will remove chessbase comments from pgn files (which are just based text files).
I have done no java programming on text files so far and so this will be a new java adventure for me. Otherwise I have limited basic java experience mainly with Java chess GUI's and java chess engines.
I show here a portion of such a pgn text file with the chessbase comments which are between the curly braces after the moves:
1. e4 {[%emt 0:00:01]} c6 {[%emt 0:00:10]} 2. d4 {[%emt 0:00:03]} d5 {
[%emt 0:00:01]} 3. e5 {[%emt 0:00:01]} Bf5 {[%emt 0:00:01]} 4. h4 {
[%emt 0:00:02]} e6 {[%emt 0:00:02]}
I want to make a java program if possible that removes these comments, so just leaving the move notation eg:
1. e4 c6 2. d4 d5 3. e5 Bf5 4. h4 e6
I am just starting with this. As yet I am unsure how to begin and do this and I would be extremely grateful for any help and advice to get me going with this project.
I look forward to replies, many thanks