小编les*_*_56的帖子

pyparsing错误

在pyparsing中我遇到了这个错误

from pyparsing import Word,alphas,nums,Or,Regex,StringEnd
ws = Regex('\s*')
dot = "."
w = Word(alphas) + (ws | dot) + StringEnd()
w.leaveWhitespace()
w.parseString('AMIT.')
Run Code Online (Sandbox Code Playgroud)

返回以下错误:

ParseException: Expected end of text (at char 4), (line:1, col:5)
Run Code Online (Sandbox Code Playgroud)

python parsing pyparsing

4
推荐指数
1
解决办法
2810
查看次数

标签 统计

parsing ×1

pyparsing ×1

python ×1