Dapatkan semua kelas dari file CSS menggunakan Python

regex = r"(\.\w+.(.*?)\})" # add the class name after . toget related classes
classes = re.findall(regex, infile.read())

for entry in classes:
    outfile.write(entry[0] + '\n')
Frightened Fish