Thanks a bunch
Although the last example by w_a_x_man looks efficient and simpler, I
needed a very specific match, as it actually matching
(http://www.google.com) and not even considering the url, then just
trying to capitalize the parentheses.
I went with
"url(http://www.google.com)".sub /(url\(['"]?)([^\)'"]+)(['"]?\))/,
"#{$1}#{$2.upcase}#{$3}"
--
Posted via http://www.ruby-forum.com/.