阅读背景:

匹配精确的字符串,由白空格python分隔。

来源:互联网 

Example:

strings_to_search = ['abc', 'def', 'fgh hello']

complete_list = ['abc abc dsss abc', 'defgj', 'abc fgh hello xabd', 'fgh helloijj']

for col_key in strings_to_search:
    print(list(map(lambda x: re.findall(col_key, x), complete_list)))
strings_to_search = ['abc', 'def', '



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: