[fix] escape minus character to avoid interpretation as range

Fixes #36
This commit is contained in:
julienmalik 2015-03-31 11:29:45 +02:00
parent bfd3cfdcab
commit f5bd2dcc2b

View file

@ -595,7 +595,7 @@ function edit_user ()
local rex = require "rex_pcre"
local rex_flags = rex.flags()
local mail_re = rex.new([[^[\w\.-+%]+@([^\W_A-Z]+([\-]*[^\W_A-Z]+)*\.)+([^\W\d_]{2,})$]], rex_flags.UTF8 + rex_flags.UCP)
local mail_re = rex.new([[^[\w\.\-+%]+@([^\W_A-Z]+([\-]*[^\W_A-Z]+)*\.)+([^\W\d_]{2,})$]], rex_flags.UTF8 + rex_flags.UCP)
local mails = {}