From: Michael Malone Date: 2009-04-09T13:13:13+09:00 Subject: Re: A hopefully simple question Chuft Captain wrote: > Hello, > > I downloaded an irc bot written in Ruby. I haven't programmed in many > years but couldn't resist the urge to tinker with the code so I peeked > inside. > > Basically I am trying to add additional string recognition statements to > this bot, so it says things in response to things people say in the > channel. > > Is there a simple way to accomplish this task by replacing the == > comparison operator with something else that searches a string variable > for a substring? > > Thanks > /Everybody stand back/ I know regular expressions if msg.text =~ %r{lol}i reply(msg, " LOLOLOLOL") ======================================================================= This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission. =======================================================================