"testhellohellohellobyebyebyehello".match(/(.+)\1+/)
This says: "Match a sequence of at least 1 character (.+), then indicate that the first thing we found \1is at least once +or more.
["hellohellohello", "hello"], , hellohellohello ( 0), "hello" 1 (, \1).
:
- "hahahaha" ["hahahaha", "haha"] ["hahahaha", "ha"]. , .