I thought about this at the time, but decided it was too much confuse to use with these simple hard coded functions already with an awkward syntax. I might return to this later, but higher complexity can always be handled with a custom script function.
You can create a script function named Split and pass static parameters, or even from other functions results. Here's a quick example:
function Split() {
var params = CurrentField.Value.split('|');
if (params.length == 3) {
ss = params[0].split(params[1]);
if (ss.length > parseInt(params[2])) return ss[parseInt(params[2])]
}
}
It takes 3 parameters as one string, with each parameters separated by a | character. The first is the string to split, the second is the separator and the last one is the index of the part to return.
Calling examples:
Split the filename by the space character, and return the second word: [Split]([F]| |1)
Split the author by a custom function returned separator, and return the first part: [Split]([A]|[GetSeparator]([A])|0)