From: lists@... Date: 2005-12-27T17:44:29+09:00 Subject: Re: escape sequences for } { and $ in gsub james Cunningham wrote: > I've found an older thread regarding escape sequences and gsub - but I > did not understand all of the explanation. I am trying to replace the > following string portion > > \$\symbol{92} > > with > > $ > is this what you need? b = "WWWW\\$\\symbol{92}KKKK" puts b.gsub(/\\\$\\symbol\{92\}/, '$') >WWWW$KKKK just escape the \ $ { } with a \ each. or, don't use regular expressions: puts b.gsub('\\$\\symbol{92}', '$') hope this helps -ramil