Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to remove all repeating characters in a string in place

by mr_ron (Chaplain)
on Jan 30, 2016 at 23:29 UTC ( #1154096=note: print w/replies, xml ) Need Help??


in reply to How to remove all repeating characters in a string in place

s/(.)\g1+//g
It's all pretty much in the Perl regex tutorial although a little background and experience with regexes may help.
Ron

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-12-07 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?