From: yvon.thoravallist@... (Yvon Thoraval) Date: 2003-09-22T15:29:01+09:00 Subject: Re: [newbie] string pattern instead of regexp Luc Heinrich wrote: > > does that means my term isn't an ANSI one or the syntax as changed ? > > tuto is mostly from v 1.4 and i'm using v1.8 under MacOS X.2.6 > > As far as I know, [...] > So in short, your gsub won't work like you expect here because you pass > it a string when you actually want a regexp. > > Replace: > > str.gsub! re, "#{st}\\&#{en}" > > by: [...] > > str.gsub! /#{re}/, "#{st}\\&#{en}" it's what i've suspected, works fine now, tanxs ! -- Yvon