Skip to content

Instantly share code, notes, and snippets.

@Haroperi
Created September 7, 2012 00:22
Show Gist options
  • Save Haroperi/3661820 to your computer and use it in GitHub Desktop.
Save Haroperi/3661820 to your computer and use it in GitHub Desktop.
most long repeat
l = gets
l.chomp!
while /^(.+)\1+/ =~ l
l = $1
end
puts l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment