How can I separate a filename from a folder in a string in ActionScript? It should split the variable and save it in two separate variables that I can use later on.
I guess I’d have to use a regex but I’m not that good at regexes.
For example:
var filepath = "/Users/folder1/folder2/test.zip";
How can I separate it into this?:
var filename = "test.zip";
var path = "/Users/folder1/folder2/";
A non-regex approach could be something like this: