lua - Remove all chars from a string except "a","b","c","d" -


i have string want replace chars , digits "", except chars a,b,c, d.

instead of having write multiple lines of long code in example below, there other way write more efficient?

mystring:gsub("[%(%)%.%%%+%-%*%?%[%]%^%$%,]", "") --special chars ... --same chars ... --same digits 

use caret symbol ^ is, [^abcd]

caret symbol negates set.

e.g., can read more here.


Comments

Popular posts from this blog

c# - ajax - How to receive data both html and json from server? -

c# - SharpDX Toolkit models rendering inside out -