Tim Arnold wrote:
Hi,
I've got some text to parse that looks like this
text = ''' blah blah blah
\Template[Name=RAD,LMRB=False,LMRG=True]{tables}
ho dee ho
'''
If you're going to include backslashes in the string literal then use a
raw string for safety.
I want to extract the bit between the
Hi,
I've got some text to parse that looks like this
text = ''' blah blah blah
\Template[Name=RAD,LMRB=False,LMRG=True]{tables}
ho dee ho
'''
I want to extract the bit between the brackets and create a dictionary.
Here's what I'm doing now:
def options(text):
d = dict()
options = text[te