正则表达式,用于完全匹配的以句点分隔的字符串

Python中用于查找以句点分隔的子字符串的正则表达式是什么?

例如:

Case 1: "something blah.foo another" return "blah.foo"

Case 2: "something blah.foo.what.not another" return "blah.foo.what.not"

Case 3: "something (blah.foo.what.not.aha) another" return "blah.foo.what.not.aha"

等等

评论