I checking string for a non-alphanumeric char.
if(str:match("%W")) then
--make str alpha-numeric
end
How to remove all non-alphanumeric chars from string using lua?
alphanumericluanon-alphanumeric
I checking string for a non-alphanumeric char.
if(str:match("%W")) then
--make str alpha-numeric
end
How to remove all non-alphanumeric chars from string using lua?
Best Answer
Use gsub (as suggested by Egor Skriptunoff):