javascriptã«ããç°¡æregexã§ã¯å¯¾å¿ã§ããªãã±ã¼ã¹ãã§ã¦ãã¾ã£ãã®ã§ãããããåèã«ãã¤ã¤rubyçãä½ã£ãã require 'resolv' require 'pp' class MailAddressValidator def self.validate(address) return validate_by_regex(address) && validate_by_MX(address) end def self.validate_by_regex(address) addr_spec = %r{^(?:(?:(?:(?:[a-zA-Z0-9_!#\$\%&'*+/=?\^`{}~|\-]+)(?:\.(?:[a-zA-Z0-9_!#\$\%&'*+/=?\^`{}~|\-]+))*)|(?:"(?:\\[^\r\n]|[^\\"])*")))\@(?:(?:(?:(
{{#tags}}- {{label}}
{{/tags}}