Reputation: 51
I would like to know a way to remove duplicate words or strings in a text file(not lines) using notepad++ regex find tool.
I only saw ways to remove duplicate lines using TextFx and that is not what i am looking for.
Example -
123 / 789 123 / 321
Removing 123 would result in
123 / 789 / 321
Upvotes: 4
Views: 5272
Reputation: 30273
I'm not familiar with Notepad++, but assuming it uses standard syntax, replace
\b(\w+)\b([\w\W]*)\b\1\b
with
$1$2
Upvotes: 4