我试图从这种格式解析日期:预期结果为((11,2012),(2014),(2016),(10,2012),.)不良价值观:“11”month = Word(nums).setParseAction(self.validate_month)date = Optional(month + Literal("/")) + year
d
我正在尝试编写一个程序,其中包含有特殊单词的所有字符串的解析。我编写了以下代码,但它不起作用:word = Word(alphas) day = Literal("day")ret = sentence_end_with_happy.parseString("hi this is a nice day and everything is ok")
我试