Python ---match

print "--------------------------"

file = open("html.txt", 'rb')
a = reversed(file.readlines())
for line in a:
    ret = re.match('\S\S\S\S\S\S\s\S\s\S\S\s',line,re.I)
    if ret:
        print line,
file.close()     
print '----------------------'

发布了98 篇原创文章 · 获赞 18 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/chpllp/article/details/84503862