Can someone tell me why, in my code below, I'm getting part of the original search in my substitution in my result, when, I'm not asking for it, or at least, I don't think I'm asking for it. Thanks, Peter Original line: <registrantName>Normandy Group LLC</registrantName> My Code: xmlfile.gsub!(/<registrantName>(.*)<\/registrantName>/, '<SUB.HEAD4>\&</SUB.HEAD4>') I've tried "\1" instead of "\&," too. Same result. I've also tried putting in "?" marks to make it non-greedy. Same result. Yields: <SUB.HEAD4><registrantName>Normandy Group LLC</registrantName></SUB.HEAD4> What I want: <SUB.HEAD4>Normandy Group LLC(/SUB.HEAD4> -- Posted via http://www.ruby-forum.com/.