Exercise: split path - filename/dirname - video

regexes

Given a path like /home/foo/.mozilla/cache/data.txt, return the filename (data.txt), and return the full-path directory name (/home/foo/.mozilla/cache).

Handle also the case of c:\home\foo.mozilla\cache\data.txt.

Other pages

Regex - Regular Expressions in Perl 5
Beginner Perl Maven video course - video

Author

Gabor Szabo (szabgab) Gabor Szabo