I'm having trouble using regular expression to remove the last two sets of data from the end of a list of directories. The directories also have different lengths as do the file names if that matters.
eg
aaaa/bbbb/cccc/dddd/123.txt
to leave just
aaaa/bbbb/cccc/
thanks
eg
aaaa/bbbb/cccc/dddd/123.txt
to leave just
aaaa/bbbb/cccc/
thanks