I have the following code:
if not (email:match("[A-Za-z0-9%.]+@[%a%d]+%.[%a%d]+")) then
print(false)
end
Currently it does not break
"test@yahoo,ca" or "test@test1.test2,com"
like a mistake.
I thought, restricting the input to the characters %aand %d- digits, by default I would catch any punctuation, including commas.
But I think I'm wrong. Or something else that I just donβt see. A second pair of eyes would be appreciated.
source
share