View Single Post
Old 03-28-2021, 07:01 AM   #1
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 173
Karma: 40000
Join Date: Oct 2013
Device: kindle
Replace repeated item with the number of times it is repeated

Hello, is there a way to replace a character or a string, repeated continuously N times, with the number N?
Say, replace "AA" with "2", "AAA" with "3" and so on, in just one regular expression?


Thank you.
1v4n0 is offline   Reply With Quote