Hi,
When I try this on IRB it works fine as follows:
>>/\A[\w+\-.!#$\%&'*\/\=?^`{|}~]+@[a-z\d\-.]+\.[a-z]+\z/.match("jd!#$\%&'*+-/=?^_`{|}[email protected]")
=> #<MatchData "jd!%&'*+-/=?^_`{|}[email protected]">

When I try it through my Ruby on Rails program I get a nil. Any idea
what is
happening? I am of course trying to validate an email syntax.
The regex is /\A[\w+\-.!#$\%&'*\/\=?^`{|}~]+@[a-z\d\-.]+\.[a-z]+\z/
The data to match is jd!#$\%&'*+-/=?^_`{|}[email protected]

Any help greatly appreciated.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to