
It is either not present, or once, twice or three times. When not present, I would need the original value returned, in all the other cases I would need everything that precedes the last occurrence of the "-", including the previous instances of "-"

It is either not present, or once, twice or three times. When not present, I would need the original value returned, in all the other cases I would need everything that precedes the last occurrence of the "-", including the previous instances of "-"