使用正则表达式
给出字符串
\*\*([^\*]*)\*\*
可以匹配多个在**
内的文本组,例如:this **is** a **test**
返回is
和test
。给出字符串
that's **right * a test**
,如何调整表达式以返回right * a test
?如何将表达式排除两个*
而不仅仅是一个?
http://regex101.com/r/aD3pC2