if invert is False:
    res = [f for f in os.listdir(path) if m.search(f)]
else:
    res = [f for f in os.listdir(path) if not m.search(f)]
res = map(lambda x: '%s/%s' % (path, x), res)
return res
regular expression using in glob.glob of python