from string:
l="\tsome string in line 1\n\tcmd: DIR @1332243996 (2012.03.20 12:46:36) state op:29 cfg:0\n\tline 3 some other string"
i want to extract "DIR", therefore i created that regex:
j = re.search(r'cmd: \w+', l)
but when i do:
print j.group()
i got:
cmd: DIR
What should I do, to get only "DIR", not with "cmd: " eg:
print j.group()
DIR
thx for all answers