in reply to Re^3: Remove duplicate from the same line..
in thread Remove duplicate from the same line..

No, it didnt worked!
  • Comment on Re^4: Remove duplicate from the same line..

Replies are listed 'Best First'.
Re^5: Remove duplicate from the same line..
by hdb (Monsignor) on Jun 01, 2013 at 18:26 UTC

    You are not very open to experimentation, are you?

    use strict; use warnings; my $str = "Goldman Sachs Group, ... Goldman Sachs Group, Inc."; $str =~ s/ \b (.+) \b [,.\s]* \1.* /$1/gx; print "$str\n";