How to get what is between the quotes in the following two texts ?
text_1 = r\"\"\" \"Some text on \\\"two\\\" lines with a backslash escaped\\\\\" \\ +
Match everything but a double quote:
import re text = "Some text on \"two\" lines" + "Another text on \"three\" lines" print re.findall(r'"([^"]*)"', text)
Output
['two', 'three']