Answers.Body: <p>The relational operators are intended to be used with numeric values. However, it would make sense to allow &lt;&gt; to be applied to non-numeric tags.</p>
  <p>You can get around this limitation in your particular case by making two passes over the games. On the first pass, select on the basis of all the tags apart from the Player one. Then make a second pass where you just match the BOT-RENAMED player. If on this second pass you also use the -n option then pgn-extract will save all the non-matched games (i.e., those not by BOT-RENAMED) to a separate file. That file should then contain the ones you want overall.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-12T22:11:38.723Z
Answers.Text: Hello David! Thank you very much for your answer, it does indeed solve my problem. I will try to remember the `-n <file>` argument. Have a great day!
Answers.UserDisplayName: Purefan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-13T20:19:24.603Z
Answers.Text: Excellent! I am glad you were able to make use of that.
Answers.UserDisplayName: kentdjb
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-12T12:06:34.970Z
Answers.LastActivityDate: 2023-11-12T12:06:34.970Z
Answers.UserDisplayName: kentdjb
Body: <p>I am trying to filter out games played by one specific player out of a large pgn file, currently my tags file looks like this:</p>
  <pre><code>WhiteElo &gt;= &quot;2500&quot;
  WhiteElo &lt;= &quot;2600&quot;
  BlackElo &gt;= &quot;2500&quot;
  BlackElo &lt;= &quot;2600&quot;
  TimeControl &gt;= &quot;180&quot;
  Player &lt;&gt; &quot;BOT-RENAMED&quot;
  </code></pre>
  <p>But the resulting file does include &quot;BOT-RENAMED&quot;, am I doing anything wrong?</p>
  <p>Alternatively, can we exclude games where the lichess tag <code>WhiteTitle</code> or <code>BlackTitle</code> are &quot;BOT&quot;?</p>
  
Tags: <pgn-extract>
Title: How to exclude games played by someone with pgn-extract
ThreadText: # How to exclude games played by someone with pgn-extract
  
  (Asked by: username_0 on 2023-11-12)
  
  I am trying to filter out games played by one specific player out of a large pgn file, currently my tags file looks like this:
  WhiteElo >= "2500"
  WhiteElo <= "2600"
  BlackElo >= "2500"
  BlackElo <= "2600"
  TimeControl >= "180"
  Player <> "BOT-RENAMED"
  
  But the resulting file does include "BOT-RENAMED", am I doing anything wrong?
  Alternatively, can we exclude games where the lichess tag WhiteTitle or BlackTitle are "BOT"?
  
  **Tags:** pgn-extract
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-11-12. Score: 4 | Accepted answer
  
  The relational operators are intended to be used with numeric values. However, it would make sense to allow <> to be applied to non-numeric tags.
  
  You can get around this limitation in your particular case by making two passes over the games. On the first pass, select on the basis of all the tags apart from the Player one. Then make a second pass where you just match the BOT-RENAMED player. If on this second pass you also use the -n option then pgn-extract will save all the non-matched games (i.e., those not by BOT-RENAMED) to a separate file. That file should then contain the ones you want overall.
  
  > **Comments:**
  > **username_0**: Hello David! Thank you very much for your answer, it does indeed solve my problem. I will try to remember the `-n <file>` argument. Have a great day!  
  > **username_1**: Excellent! I am glad you were able to make use of that.  
  
  ---
  
  