From: "John N. Alegre" Date: 2006-03-09T00:28:41+09:00 Subject: Re: Valid email address from CGI input? Julian, Sorry to look dumb I am kind of new to Ruby. I move quickly with all the OOP aspects of it, coming from a Java background, but the lower level stuff, especially regex is a learning curve. When I use this code ... def email_valid?(email_address)     email_address =~ /^([a-zA-Z0-9&_?\/`! #*$^%=~{}+'-]+|"([\x00-\x0C\x0E-\x21\x23-\x5B\x5D-\x7F]|\\[\x00-\x7F])*" (\.([a-zA-Z0-9&_?\/`! #*$^%=~{}+'-]+|"([\x00-x0C\x0E-\x21\x23-\x5B\x5D-\x7F] \\[\x00-\x7F])*"))*@([a-zA-Z0-9&_?\/`!|#*$^%=~{}+'-]+ \[([\x00-\x0C\x0E-\x5A\x5E-\x7F]|\\[\x00-\x7F])*\])(\.([a-zA-Z0-9&_?\/`! #*$^%=~{}+'-]+|\[([\x00-\x0C\x0E-\x5A\x5E-\x7F]|\\[\x00-\x7F])*\]))*$/ end in the actual code file I have the regex in one long line such as def email_valid?(email_address)     email_address =~ /^([a-zA-Z0-9&_?\/`!|#*$^ and all the rest of the regex end email_address is null after every evaluation both valid and invalid. What am I missing? Is there a way in Ruby Syntax to split the regex and have Ruby ignore the ? Thanks for your continued help john