Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
include? won't find match even though it's in String
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Robert Klemme, post: 4643612"] What Ruby version? Can you show the exact code to build the string test12? It works for me even on 1.8: $ irb irb(main):001:0> s=<<STR irb(main):002:0" foo irb(main):003:0" bar irb(main):004:0" [email]person@cogeco.ca[/email] irb(main):005:0" baz irb(main):006:0" STR => "foo\nbar\nperson@cogeco.ca\nbaz\n" irb(main):007:0> s.include? "person@coge" => true irb(main):008:0> s.include? "person@cogec" => true irb(main):009:0> I suggest to print the string with p to discover control characters you might have in there. Kind regards robert [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
include? won't find match even though it's in String
Top