Use string.match with a pattern anchored to the end of the string ($)
string.match
s = "foo> <bar ... <baz.ind>" print(s:match("<(.*)>$"))