Removing a file from A path(perl)

Posted by Zerobu on Stack Overflow See other posts from Stack Overflow or by Zerobu
Published on 2010-04-06T01:28:08Z Indexed on 2010/04/06 1:33 UTC
Read the original article Hit count: 256

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about regex

Related posts about perl