import re
text = "**Company** [Click1](call:58200) ******provides*** **housekeeping** **clean***"
bold = re.findall(r'\*{2}(\w+?)\*{2}', text)
print bold
result: ['Company', 'provides', 'housekeeping', 'clean']
expect: ['**Company**', '**housekeeping**']
如何设计regex模式来grep它?你知道吗
你可以试试Lookaround
Online demo
示例代码:
图案说明:
相关问题 更多 >
编程相关推荐