in reply to duplicate string with regular expression

You will probably find this fairly enlightening: Removing duplicate substrings from a string - is a regex possible?
  • Comment on Re: duplicate string with regular expression