Programming language: Ruby 1.9
I know it’s an easy question, but Google and the Ruby quickref for
File have no solution for me.
And I have no experience with Regex.
Use the Ruby
File.dirname("C:/Test/blah.txt") # => "C:/Test"