From: Chris Dutton Date: 2004-07-12T09:12:25+09:00 Subject: Re: Syntax question for gsub Dirk Einecke wrote: > Hi. > > Marcin Miel�y�ski wrote: > >> It should work for any tag > > > But I do not unterstand this: > > gsub!( /<(.+)>(.*?)<\/\1>/ ) { "<#{$1}>foo" } > > How this code take the var "tagName" ? Should just be something like: gsub!( /<(#{tagName})>(.*?)<\/\1>/ ) { "<#{$1}>foo" }