# # Second attempt # instructions = "" # with open(input_f) as file: # for line in file: # instructions += line # print(instructions) # #(do\(\).*?mul\((\d+),{1}(\d+)\)) # (?<=do\(\))([^d]*(mul\(\d+,\d+\))[^d]*)+(?=don't\(\)) # (?<=do\(\))[^m]*(mul\((\d+),{1}(\d+)\)*)*[^d]*(?=don't\(\))