From: Stuart Clarke Date: 2008-11-17T04:19:55+09:00 Subject: Re: gsub and reg expressions The regular expression needs to be in array otherwise I recover everything from the event.description field and i only want that specfic text. Sebastian Hungerecker wrote: > Stuart Clarke wrote: >> event.description.gsub([/Logon Type:\t2/], 'Local Logon') >> >> However when i run this code i get the following error: >> >> C:/Documents and Settings/sc/Desktop/test.rb:116:in `gsub': wrong >> argument type Array (expected Regexp) (TypeError) >> >> Does anyone have any ideas where I am going wrong? > > Ehrm, why did put the regex into an array? That's what's causing the > error. > > HTH, > Sebastian -- Posted via http://www.ruby-forum.com/.