Hi,
I am trying to extract the content of my text between 2 known lines. Raw Request: { line1 line2 line3 } Request End
I want to get these line out:
line1 line2 line3 }
Can anybody show me how to do that?
Thanks,
Son Nguyen
from pyparsing import Literal, SkipTo rr = Literal("Raw Request: {").suppress() + SkipTo("Request End") sample = """Raw Request: { line1 line2 line3 } Request End""" res = rr.parseString(sample) print(res)
Log in to post a comment.
Hi,
I am trying to extract the content of my text between 2 known lines.
Raw Request: {
line1
line2
line3
}
Request End
I want to get these line out:
line1
line2
line3
}
Can anybody show me how to do that?
Thanks,
Son Nguyen