Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by hdb (Monsignor)
on Jun 01, 2013 at 18:26 UTC ( #1036484=note: print w/replies, xml ) Need Help??


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

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://1036484]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2021-04-13 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?