我正在使用pyparsing并尝试使用Skipto方法来获得文本中几个可能的文本的第一次出现。在
想象一下类似的情况:
OneOrMore(SkipTo(...longer expression...) | SkipTo(...another long expression...))
我不能融合这两个skipot,因为它们位于不同的类中,并且它不适合当前的系统来融合这些类。在
如果我现在有一个类似的文本:
^{pr2}$它只找到Example1
事件,而忽略另一个。
现在我的问题是如何跳到文件中的第一个可能性,从而找到所有发生的情况。在
如果只尝试处理较大文本体中的位和段,请尝试使用searchString或scanString而不是parseString。在
印刷品
^{pr2}$相关问题 更多 >
编程相关推荐