Skip to content

Instantly share code, notes, and snippets.

@osteele
Created January 20, 2009 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osteele/49610 to your computer and use it in GitHub Desktop.
Save osteele/49610 to your computer and use it in GitHub Desktop.
puts (1..100).map { |n| 'x'*n+"#{n}\n" }.join.
gsub(/^(xxx)*\d/,'Fizz').gsub(/[05]$/,'Buzz').gsub(/^x*|\d*(.+?)\d*/,'\1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment