Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Regex solution in Clear category for Long Repeat by vnkvstnk
import re
def long_repeat(line):
if not line:
return 0
regex = re.compile(r"(\w)\1*")
groups = [x.group() for x in regex.finditer(line)]
return len(max(groups, key=len))
May 27, 2019
Comments: