Originally Posted by Resike
I think this could work also, i'm just not sure it's faster then the single gsub call or not. Need to test it.
|
Seems like this could do the trick:
Code:
gsub(name, "%-[^ >]+", "")
Upvaluing gsub instead of using string.gsub or name:gsub is also faster.