is_san | R Documentation |
The function uses regular expressions to check if the string's tokens match the expected pattern for chess moves in SAN.
is_san(movetext)
movetext |
A character string, possibly containing a series of chess moves in SAN. |
Before making the check, an attempt is made to remove annotations, game termination markers, or other content that would disrupt the regular expression pattern. Note that this function does not check if the moves are legal.
TRUE if the string contains chess moves in SAN format, FALSE otherwise.
is_san("1. e4! {best by test} e5 2. Nf3 {black resigns in shame} 1-0")
is_san("e2e4 e7e5 g1f3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.