modify sscanf mode for matching close token