From: Stuart Clarke Date: 2008-11-17T04:00:26+09:00 Subject: gsub and reg expressions I am having a few problems getting gsub to work with my regular expressions. I have a field full of data and therefore I am using a regular expression to extract one part of it - #{event.description[/Logon Type:\t2/]} This works fine. I want to now add in gsub to replace 'Logon Type: 2' with the string 'Local Logon' - #{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 argumen t type Array (expected Regexp) (TypeError) Does anyone have any ideas where I am going wrong? Many thanks -- Posted via http://www.ruby-forum.com/.