使用:http://www.regexplanet.com/advanced/java/index.html,并测试正则表达式:
我参考了这篇文章:http://www.rexegg.com/regex-lookarounds.html,并尝试了其他组合,但都不能达到我想要的效果。
例如,对于测试输入和匹配,我期望...
\.{0,1}
(?=.*?\.{0,1})
我参考了这篇文章:http://www.rexegg.com/regex-lookarounds.html,并尝试了其他组合,但都不能达到我想要的效果。
例如,对于测试输入和匹配,我期望...
lo.cat.tion - no match
location - match
loc_ation - match
loc.ation - match
但是它告诉我没有任何匹配。我在这里做错了什么?:(