Here is some simple code to filter specified characters from user input:
local filter = "10abAB"
local input = io.read()
input = input:gsub("[^" .. filter .. "]", "")
filter , . , c, c: local filter = "10abcABC".
, io.read(), , , io.read() , .
- , . string:gsub, , :
input = string.gsub(input, "[^" .. filter .. "]", "").
, , .
gsub [^10abAB], , , , - ^ , , .
, , , :
local input = io.read():gsub("[^10abAB]", "")