Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Remove duplicate from the same line..

by Anonymous Monk
on Jun 01, 2013 at 17:28 UTC ( #1036476=note: print w/replies, xml ) Need Help??


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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2021-04-14 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?