Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很快就把这个扔了。在记事本++中应该可以正常工作。确保设置全局标志(如果有)和多行标志。
/^.+(\.[^.]+)$(?=\s*(?:(?!<tag>)[^.])+\1)|^(?!<tag>)[^.]+/gm
你应该(很可能)不要像我上面那样使用标志和分隔符。我相信你会弄清楚的。
说明+演示:http ://regex101.com/r/lC0lD1