This is one of those things where I\'m sure I\'m missing something simple, but... In the sample program below, I\'m trying to use Python\'s RE library to parse the string \"
You should use re.findall instead:
re.findall
>>> line = ' 0 repaired, 90.31% done' >>> >>> pattern = re.compile("\d+[.]\d+(?=%)") >>> re.findall(pattern, line) ['90.31']
re.match will match at the start of the string. So you would need to build the regex for complete string.
re.match