I want to store the data that made match with the regular expression, I want this data to be stored and generate a new file with the name of the file that was read and all these address to a folder
import re
pattern1 = re.compile(r"(\w+:\w+\s?= status)|(\w{7,}\s?= status)")
with open("C:\Curso Python\YTS\s.YT3792B","r") as f:
leer = f.read()
matches = pattern1.finditer(leer)
for match in matches:
print(match)