Try this - you can replace the {2} with the number of desired path elements:
regex([filename],/#(\\(.+?\\){2})#/,1)
This looks like easiest one to me for the problem in question
A Replace([filename], \, ; ) can also be used to convert the path to a list of elements, which can then be manipulated with the list functions.
Don't even need use Replace as ListItem takes delimiter in so one can use
\ as delimiter instead of ;
\\ListItem(\\NAS1\Concert_Collection\,2,
\)\ListItem(\\NAS1\Concert_Collection\,3,
\)\
or with empty items removed:
Save(ListClean([filename (path)],3,\), v_PathElements)/
\\ListItem([v_PathElements],0,\)\ListItem([v_PathElements],1,\)\