REGEX-字符串和转义引号
发布于 2021-01-29 14:10:39
如何获得以下两个文本中引号之间的含义?
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'
]
关注者
0
被浏览
124
1 个回答