RE function
lily
utakecare2 at yahoo.com
Wed Nov 13 16:15:20 EST 2002
Hello,
I need help. I am trying to parse some strings where I want to use the RE function. How can I find all the lines that start with '(object Operation' and should contain the word 'Trace' followed by ': {' ?
(object Operation...
|Trace: {...}
... ))
I tried using the following code to capture all the instances of these patterns:
tracepattern = re.compile("\(object\s+Operation<.*?>+\sTrace<.*?>\)")
traceoperations = re.findall(tracepattern, operations)
Can you please tell me what is wrong with the above code?
Thanks.
a newbie.
---------------------------------
Do you Yahoo!?
U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20021113/4bd4f4e6/attachment.html>
More information about the Python-list
mailing list