Nobody knows what you mean by "doesn't seem to work". Spell out what you want it to do. This is what it does:
>>> import re
>>> pattern = re.compile(r"([0-9]+?)\1+")
>>> print pattern.search("1110111011").group()
111
And that's exactly what the regexp asked it to do: it found the shortest repeating pattern at the leftmost position where one occurs, which happens to be 3 repetitions of the initial digit 1. If you want the longest repeated pattern at the leftmost position at which one occurs, take ? out of the regexp:
>>> print re.search(r"([0-9]+)\1+", "1110111011").group()
11101110
If you want something else, you'll need to say what that is ;-)
Finding the longest overall
As noted, a regexp search finds the leftmost position at which the pattern matches, and that's all. So consider this:
pattern = re.compile(r"([01]+)\1+")
print(pattern.search("11010").group())
That does not find "1010". The leftmost position at which the pattern matches is at the first character, where "1" is repeated. So that prints "11".
Applying re.findall() can't help in this case, because the true longest match overlaps the "11" initially found. findall() only returns non-overlapping matches.
Overcoming this is pretty excruciating ;-) It's possible to do it with a single regexp, via abusing a "positive lookahead assertion":
pattern = re.compile(r"(?=(([01]+)\2+))")
for match in pattern.finditer("11010"):
print(match.group(1), "at {}:{}".format(*match.span(1)))
That displays:
11 at 0:2
1010 at 1:5
But I don't know of a way to make a regexp find only the longest global match, and would be surprised if such a way exists.
10to the end of it?([0-9]+?)\1. I'll see if I can locate the reference.