From: Henry Maddocks Date: 2012-12-21T06:23:32+09:00 Subject: Re: trying to strip characters from a line On 21/12/2012, at 9:36 AM, Paul Mena wrote: > > > Executing the code results in an "archive.html" file with all of the > "stripped" characters still intact. Am I invoking the gsub method > incorrectly? Thanks in advance for any help. There are two forms of gsub… >> line = "this is a line with ***** in it" => "this is a line with ***** in it" >> line.gsub '*', '' => "this is a line with in it" >> line => "this is a line with ***** in it" >> line.gsub! '*', '' => "this is a line with in it" >> line => "this is a line with in it" The first form returns a new string, the second modifies the receiver. Also your regexp in the gsub probably doesn't do what you think it does. You might want something like… line.gsub /[\[\],"]/, "**" Henry