Given the full path to a file, how do I get just the path without the filename?
- by Zerobu
Hello,
Suppose I have a path in a string called '/home/user/directory/HelloWorld.txt'. I would like to remove the HelloWorld.txt, and end up with '/home/user/directory'. What regex would I need.