Posit Community
Regular expression to match any character being repeated more than 2 times, and any 2 characters being repeated more than 2 times
General
regex
TimLearnCoding
July 20, 2022, 5:15am
1
I tried "^(.)\1{2,}$" but output was always character(0)
nirgrahamuk
July 20, 2022, 8:10am
2
I think it would be
(.)\1|(..)\2