I need a regex that will find everything in a string up to and including the last \\ or /.
For example, c:\\directory\\file.txt should result in c:\\directory\\
^(.*[\\\/])[^\\\/]*$