如何获取以下两个文本中引号中的内容?
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'
]