![]() ![]() Am I missing something?Ĭode: Var f As FolderItem = FolderItem.ShowOpenFileDialog("PGN") I tried your regex with the following file (a valid pgn file with just one game), using the code below, but it does not work. So while it is certainly possible to read the file from left to right, careless comments could easily cause you problems. Since the comment could contain numbers, dots, or semicolons… yikes… Inside which you get 2 algebraic notations, which MIGHT be side by side. Trying to brute force this file needs you to look for successive numbers followed by a dot, to indicate move groupings. Its probably quite old… JSON or XML would meet these needs so much better by keeping data types separate… comments would be an optional attribute of a move, for example. Moves are recorded in algebraic notation, and comments can be inserted after a “ ” symbol or between parentheses or curly brackets. ![]() Its not a very robust file format… comments can occur anywhere and have a number of indicators “Usually, the PGN contains one entire game, but it can also record just a fraction of a game.” ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |