From: Shea Barton Date: 2010-11-22T02:55:42+09:00 Subject: Re: Partial GSUB match / replacement Actually I'm having a bit more trouble. When I use css.gsub /(url\(['"]?)([^\)'"]+)(['"]?\))/, "#{$1}#{$2.upcase}#{$3}" on a block of css, what happens is, every instance of url(...), gets replaced with the upcase of the last instance of it. so body { background: url(/images/site_background.png) } p { background: url(/images/image.png); margin-left: 10px; } => body { background: url(/IMAGES/IMAGE.PNG) } p { background: url(/IMAGES/IMAGE.PNG); margin-left: 10px; } -- Posted via http://www.ruby-forum.com/.