From: "Mauricio Fernández" Date: 2002-08-13T01:06:05+09:00 Subject: Re: replacing values in some files: line endings etc On Mon, Aug 12, 2002 at 06:30:22PM +0900, Tobias Reif wrote: > Hi, > > on Windows, I need to replace some values in a file; see the program below. [...] > 2. gsub > > How could I match a longer string, but replace only a part of it? > eg ~ > string.gsub! /<(embed|object).+?width="\d+"/, "width=\"#{w}\"" > ... but the