I am trying to pull the digit values (100.00 & 200.00) using pythons regular expressions , but when I invoke the code it doesn't yield anything... I am using python version 2.7
1) My file name is "file100" from where I need to opt the values..
# cat file100
Hi this doller 100.00
Hi this is doller 200.00
2) This is my python code..
# cat count100.py
#!/usr/bin/python
import re
file = open('file100', 'r')
for digit in file.readlines():
myre=re.match('\s\d*\.\d{2}', digit)
if myre:
print myre.group(1)
3) While I am running this code , it does not yield anything , no error .. nothing ..
# python count100.py