我試圖用pyparsing匹配一個多行字符串,可以以類似的方式繼續與蟒蛇: Test = "This is a long " \
"string"
我不能找到一種方法,使pyparsing承認這一點。以下是我試過到目前爲止: import pyparsing as pp
src1 = '''
Test("This is a long string")
'''
src2
鑄我發現從另一個問題下面的例子: Here 它有一些pyparsing這樣的代碼: from pyparsing import *
survey = '''GPS,PN1,LA52.125133215643,LN21.031048525561,EL116.898812'''
number = Word(nums+'.').setParseAction(lambda t: float(t[0
我想解析一個配置設置文件,我從stdout通過ssh腳本獲取。我需要將這些轉換爲鍵/值對。該配置設置是這個樣子: 輸出設定 show all <==== TRYING TO KEEP THIS LINE FROM BEING PARSED
Active System Configuration <==== TRYING TO KEEP THIS LINE FROM BEING PARSED