Works with regular expressions. Prints correct pgn to stdout