Created
February 13, 2013 00:45
-
-
Save widoyo/4780246 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os, glob | |
order_num = [] | |
filelist = glob.glob(os.path.join('.', 'feb_*.txt')) | |
re_order_num = re.compile('Order No: (?P<orderno>\d+)') | |
for f in filelist: | |
data = open(f).read() | |
r = re_order_num.search(data) | |
if r: | |
nomor_order = r.groupdict()['orderno'] | |
if nomor_order not in order_num: | |
order_num.append(nomor_order) | |
print f, nomor_order |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment