So far I have: (for context, I am parsing lines of code)
for line in file.readlines():
pattern = r'"((\\\\"|[^"])*")|\'((\\\\\'|[^\'])*\')'
matches = re.search(pattern, line)
however doing matches.group() only gives the first string in code that is caught, how can I get multiple strings in a single line.