如何获得以下两个文本中引号之间的内容?
text_1 = r""" "Some text on \"two\" lines with a backslash escaped\\" \
+ "Another text on \"three\" lines" """
text_2 = r""" "Some text on \"two\" lines with a backslash escaped\\" + "Another text on \"three\" lines" """
对我来说,问题是引号如果被转义应该被忽略,但是反斜杠有可能被转义。
我想获得以下组。
[
r'Some text on \"two\" lines with a backslash escaped\\',
r'Another text on \"three\" lines'
]