I have a path: User/Me/aFolder/anotherFolder/variableFolder/someOtherStuff
string $variableA = "variableFolder";
I need everything in the path to be returned up until the $variableA in the path (I'm using MEL not Python). That folder and its children will be replaced with a loop later on, but i need to keep the path before $variableA stored in a separate variable.
I've come up with some convoluted MEL that will get me the answer. But I'm sure there is an easier way.