Just realized Ruby’s File.basename can also filter out (arbitrary) file extensions. 😀
File.basename("foo/bar/baz.html", ".*") #=> "baz"
Just realized Ruby’s File.basename can also filter out (arbitrary) file extensions. 😀
File.basename("foo/bar/baz.html", ".*") #=> "baz"