, re.match, , , re.search, , . , :
import re
(Python , , ). VERBOSE, . r, , , Python :
regex = re.compile(r'''
\s # one whitespace character, though I think this is perhaps unnecessary
\d* # 0 or more digits
\. # a dot
\d{2} # 2 digits
''', re.VERBOSE)
, 'rU', , , .
with open('file100', 'rU') as file:
readlines, . - :
for line in file:
myre = regex.search(line)
if myre:
print(myre.group(0))
:
100.00
200.00