How could I design a RegEx script which would remove a filename from a path? The trick is, the paths have all sorts of wrenches to throw into the works.
Paths can consis
You can use this.
[^\/]+$
'$' matches the position at the end of the string while '[^/]+' matches any string that does not have any '/'.