import glob import re files = glob.glob("admin_*.php") pattern = re.compile(r'