https://regex101.com/r/kBxa7R/2
I have following regex: \b(\w+) \b(?=.*\b\1)
I need to remove all duplicates in string. So for instance:
Mike Tyson 1. Street 1234 Vietnam ML(12534/97632) Mike Tyson 1234 1. Street Vietnam ML(12534/97632)
should results in:
Mike Tyson 1. Street 1234 Vietnam ML(1234/97632)
I already know why it fails, but I do not know how to fix it. I only look for \w+ and therefore "1." or "ML(156746/615893)" is not beeing found. But when I add these missing characters manually or replace the whole statement by .+ weird stuff is going on.
Can someone help?