TreeFinger
July 11th, 2008, 02:07 PM
How do I get re to print the string i'm searching for that matches re.search? All I can do is print the entire line right now.
All I get is : '<_sre.SRE_Match object at 0x00A83608>'
edit.. nevermind.
if p.search(line):
m = p.search(line)
print m.group()
All I get is : '<_sre.SRE_Match object at 0x00A83608>'
edit.. nevermind.
if p.search(line):
m = p.search(line)
print m.group()