Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How do I remove consecutive pairs of characters?

by faq_monk (Initiate)
on Oct 08, 1999 at 00:20 UTC ( #592=perlfaq nodetype: print w/replies, xml ) Need Help??

Current Perl documentation can be found at perldoc.perl.org.

Here is our local, out-dated (pre-5.6) version:

To turn "abbcccd" into "abccd":

    s/(.)\1/$1/g;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[choroba]: bare SQL seems to work differently. Failing a prepared statement doesn't abort the transaction. So it's a behaviour of the DBD driver
[choroba]: and smells like a bug
[choroba]: oh wait
[choroba]: it doesn't abort, but it blocks any other operations than aborting
[choroba]: so it kind of makes sense
[huck]: "Aaarrr!"

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-09-19 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (222 votes). Check out past polls.

    Notices?