From: Robert Klemme Date: 2009-03-25T16:06:54+09:00 Subject: Re: gsub and single quote issue On 25.03.2009 06:18, 7stud -- wrote: > Robert Klemme wrote: >> The sequence \' in a replacement string is interpreted as the post >> match. > > I assume that has something to do with ruby's crazy global variables, > e.g $'. In that case, why isn't the '$' required. The replacement string is interpreted by sub and gsub and this is just the convention that was chosen. Btw, it's the same convention as in sed and a number of other regular expression based replacement tools as well. Kind regards robert