【发布时间】:2014-03-16 23:29:32
【问题描述】:
我正在寻找与重复模式匹配的正则表达式。
例如
The great eagle flied high flied high.
重复:flied high
The call was done at night was done at night.
重复:was done at night
有没有办法做到这一点?我只想要正则表达式,以便我可以使用grep -P 过滤一些文件。
Found 5 files under folders: home folder, home folder, home folder, home folder, home folder
重复:home folder
The query returned this preferences for this user: color black, fried chicken, color black, fried chicken, white shirt, brown color
重复:color black,
本质上,我想做的是找到“重复的句子”来匹配”。
【问题讨论】:
-
你有没有努力为自己解决这个问题? Stack Overflow 是程序员在遇到问题时可以向同时代人寻求帮助的地方。它并不打算用作免费编程工作的来源。