I\'m trying to write a regex that will parse out the directory and filename of a fully qualified path using matching groups.
so...
/
Try this:
/^(\/([^/]+\/)*)(.*)$/
It will leave the trailing slash on the path, though.