Answers.Body: <p>The short answer is that <a href="https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/" rel="nofollow noreferrer">pgn-extract</a> cannot do that. However, it would be an interesting feature to add, so feel free to email me to discuss it as a future addition.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-27T07:22:40.883Z
Answers.Text: I am sorry if you didn't like my approach to this one. pgn-extract is my software (albeit open source). So, it was a genuine offer to add the functionality if the OP wanted me to add it to a future release. My feeling is that that sort of discussion of requirements is better had via email rather than in a forum like this.
  The concrete answer was that pgn-extract can't currently do that :)
Answers.UserDisplayName: kentdjb
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-24T17:50:35.260Z
Answers.LastActivityDate: 2024-08-24T17:50:35.260Z
Answers.UserDisplayName: kentdjb
Body: <p>I see that pgn-extract can search for variations in games, but all of the examples in the documentation show variations from the starting position. What if I wanted to look for variations in the middle of the game, say I want to find games where the following sequence has been played at any given time in the game:</p>
  <p><code>Bxf7+ Kxf7 Ng5+</code></p>
  <p>I don't see a good way to do this. I see the --startply flag, but I wasn't sure if it looks exactly after the ply it's asked to start at, or at all sequences after that ply. Either way, I couldn't get it to work in a sensible way under either interpretation, so I'm not sure that's the answer.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-27T17:23:21.943Z
Comments.Text: You can use [CQL](http://www.gadycosteff.com/cql/).
Comments.UserDisplayName: double-beep
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-29T03:57:24.113Z
Comments.Text: Thanks for the link, had never heard of that.
Comments.UserDisplayName: av06
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-29T08:12:30.633Z
Comments.Text: No problem. If you encounter any issues, you can always post a new question here.
Comments.UserDisplayName: double-beep
Tags: <pgn-extract>
Title: Can pgn-extract find sequences of moves in the middle of the game?
ThreadText: # Can pgn-extract find sequences of moves in the middle of the game?
  
  (Asked by: username_0 on 2024-08-24)
  
  I see that pgn-extract can search for variations in games, but all of the examples in the documentation show variations from the starting position. What if I wanted to look for variations in the middle of the game, say I want to find games where the following sequence has been played at any given time in the game:
  
  `Bxf7+ Kxf7 Ng5+`
  
  I don't see a good way to do this. I see the --startply flag, but I wasn't sure if it looks exactly after the ply it's asked to start at, or at all sequences after that ply. Either way, I couldn't get it to work in a sensible way under either interpretation, so I'm not sure that's the answer.
  
  **Tags:** pgn-extract
  
  > **Comments:**
  > **username_1**: You can use [CQL](http://www.gadycosteff.com/cql/).  
  > **username_0**: Thanks for the link, had never heard of that.  
  > **username_1**: No problem. If you encounter any issues, you can always post a new question here.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-08-24. Score: 0
  
  The short answer is that [pgn-extract](https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/) cannot do that. However, it would be an interesting feature to add, so feel free to email me to discuss it as a future addition.
  
  > **Comments:**
  > **username_2**: I am sorry if you didn't like my approach to this one. pgn-extract is my software (albeit open source). So, it was a genuine offer to add the functionality if the OP wanted me to add it to a future release. My feeling is that that sort of discussion of requirements is better had via email rather than in a forum like this. The concrete answer was that pgn-extract can't currently do that :)  
  
  ---
  
  