From: Greg Millam Date: 2002-12-19T18:38:16+09:00 Subject: Re: Few question about IO On Thu, 19 Dec 2002, Radek Hnilica wrote: > does not work for me: > irb(main):032:0> ": dbl dup + ;".gsub(%r[(\s|^)\+(\s|$)], %Q[\1:plus:\2]) > => ": dbl dup\001:plus:\002;" > > something is wrong with \1 and \2 My bad - need to escape those. \\1 and \\2 irb(main):032:0> ": dbl dup + ;".gsub(%r[(\s|^)\+(\s|$)], %Q[\\1:plus:\\2]) Whoops. - Greg > -- > Radek Hnilica -- Greg Millam walker at deafcode.com