Skip to content

Instantly share code, notes, and snippets.

@jkokenge
Created February 12, 2012 21:18
Show Gist options
  • Select an option

  • Save jkokenge/1810893 to your computer and use it in GitHub Desktop.

Select an option

Save jkokenge/1810893 to your computer and use it in GitHub Desktop.
RemoveFileExtension
somefile = "BatmanRising.csv"
file_without_extension = somefile.match(/.*(?=\..+$)/).to_s
puts file_without_extension
"BatmanRising"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment