Regex optional match in python fails
- by AaronG
tickettypepat = (r'MIS Notes:.**(//p//)?.**')
retype = re.search(tickettypepat,line)
if retype:
print retype.group(0)
print retype.group(1)
Given the input.
MIS Notes: //p//
Can anyone tell me why group(0) is
MIS Notes: //p//
and group(1) is returning as None?