Better regex for OnChatTab

It's not necessary to use a for loop, we can just match the last word with lua patterns.