A function similar to "before(" function but starting at the right hand side of a string
Is there a function that works like the before( function but starts looking for the tag at the end of the string working left?
I am working on a procedure that usually opens a document when referencing the path with the “openanything PATH” statement. That is a cinch.
However, if I want to open the folder instead of the document I have to trim from the right end of the path string left to the last trailing “/” or forward slash in the string.
The end result would be two procedures, one “Open Document” and the other “Open Folder” using the same data, one intact and the other trimmed of the document name.
The before( function does not work because depending on the number of slashes in the path it looks like I am destined for a heart pounding exercise with Text Funnels.
I know conceptually how to do that but want to avoid it if possible.
[“-/”,-1] will return everything from the last slash to the last character, trimming everything that comes before it. So it was trimming the part you wanted to keep, and keeping the part you wanted to trim.
A third option, I thought of after I posted earlier, would be to use the arraytrim( function.