local String = "[HELLO]"
How can I remove the “[]”? I know it’s possible using string.gsub, but I don’t know how.
Thanks for help!
local String = "[HELLO]"
How can I remove the “[]”? I know it’s possible using string.gsub, but I don’t know how.
Thanks for help!
str = str:gsub('[%p%c%s]', '')
Escape any magic character by using the percentage sign (%)
before it:
local String = "[HELLO]"
print( String:gsub("[%[%]]", "") )