You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
257 B

module RubyEmail
ATEXT = '([\w!#\$%&\'*\+\-/=\?\^_`\{\}\|~])'
#ATEXT = '\w'
ATOM = "#{ATEXT}+"
DOT_ATOM_TEXT = "(#{ATOM})(\.#{ATOM})*"
VALIDE = "(?<local>#{DOT_ATOM_TEXT})@(?<domain>#{DOT_ATOM_TEXT})"
REGEXP = Regexp.new "\\A#{VALIDE}\\Z"
end