From: Tobias Reif Date: 2002-08-12T19:32:47+09:00 Subject: Re: replacing values in some files: line endings etc ts wrote: thanks for your tips > T> # how to write these in one (gsub) line? > T> string.gsub! /width="\d+"/, "width=\"#{w}\"" > T> string.gsub! /height="\d+"/, "width=\"#{h}\"" > > You really want to replace height with width ? No. It should do the same as the above. Perhaps a gsub with block, then case $1 when 'width' then #height when 'height' then # ... Tobi -- http://www.pinkjuice.com/