在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)