Well, I had to create a full-blown program to do it, but here we are.
Tested with one row holding "Read - Romance/International" and the other holding "Romance/International", so it should finally work:
Code:
program:
#save stuff before " - " (optional)
start=list_item(field('tags'),-2, ' - ');
#save stuff after it (mandatory)
end=list_item(field('tags'),-1, ' - ');
#strip var 'end' to first letter of each side of the "/"
end=re(end,'([^-/])[^-/]*(/)([^-/])[^-/]*','\1\2\3');
#return a value
strcat(
#returns first letter of start, if it exists
shorten(start,1,'',0),
#test for start, if present, return " - "
test(start,' - ',''),
#return (stripped) end
end
)
I don't think plugboards can hold multiline programs, so here is a one-liner just in case (without comments):
Code:
program:start=list_item(field('tags'),-2, ' - ');end=list_item(field('tags'),-1, ' - ');end=re(end,'([^-/])[^-/]*(/)([^-/])[^-/]*','\1\2\3');strcat(shorten(start,1,'',0),test(start,' - ',''),end)
Whew! That was crazy, and pretty cool!


