From: "toulax@..." Date: 2007-06-29T12:30:06+09:00 Subject: Re: Help with regular expression Like I said it has to be a regular expression, nothing else, any ideas? On Jun 28, 11:24 pm, "Stephen Ball" wrote: > On 6/28/07, dbl...@wobblini.net wrote: > > > > > Hi -- > > > On Fri, 29 Jun 2007, Jesse Hk wrote: > > > > Am I missing something here? Why not just test for equality? > > > > irb(main):001:0> "foo" == "foo" > > > => true > > > irb(main):002:0> "foo" == "bar" > > > => false > > > That doesn't cover the case where the string includes the substring > > "bar" but also includes other characters. > > > David > > In that case it still works, so we have: > > "foo" => "foo" > > irb(main):001:0> "foo" == "foo" > => true > > "bar " => nil > > irb(main):002:0> "foo" == "bar" > => false > > "foobar" => nil > > irb(main):003:0> "foo" == "foobar" > => false > > -- Stephen