Exercise: Split file path using regex
Write two functions.
Given a path like /home/foo/.mozilla/cache/data.txt, one of the functions will return the filename (data.txt), the other function will return the full-path directory name (/home/foo/.mozilla/cache).
Handle also the case of c:\home\foo\.mozilla\cache\data.txt.
Published on 2015-11-08