Who mentioned anything about a goat?

But in any case, how is that applicable here?

Unless you mean, first establish what the last 5 characters are (by truncating from end to 5), then split the main text by those characters, and select the first item? That would work.

You could do the same with find and replace: truncate the string to 5 chars form the end, then use find and replace to replace those character in the original string with nothing.

Both would work, but Text:truncated to (Text:number of characters - 5) is simpler (I think so anyway).