I managed to make it work with a pattern like this:
Lua Code:
print(string.gsub("PLAYERNAME-Aggra(Português)", "%-[%a+êé'()]+", ""), string.len(string.gsub("PLAYERNAME-Aggra(Português)", "%-[%a+êé'()]+", "")))
Returns: "PLAYERNAME", 10
The weird part is this function strips properly too, however it brokes the string.len:
Lua Code:
print(string.gsub("PLAYERNAME-Aggra(Português)", "%-[%a+é'()]+", ""), string.len(string.gsub("PLAYERNAME-Aggra(Português)", "%-[%a+é'()]+", "")))
Returns: "PLAYERNAME"
And i only used the "é" pattern here to properly handle some French server names like: "Chants éternels".