Python reg查找所有出现的字符串

时间:2019-06-13 06:52:07

标签: python regex

嘿,我试图在单词localise("some_key")之间找到关键标题

我当前的代码是:

import re

search_string1 = "localize\(\"(.*)\"\)"
s = 'Find words here localize("key_1") some localize("key_2")'
result = re.findall(search_string1, s)
print(result)

但是,它会打印['key_1") some localize("key_2']。我期待着['key_1', key_2']。我在哪里做错了?

0 个答案:

没有答案