From: ts Date: 2003-09-22T00:56:10+09:00 Subject: Re: [newbie] string pattern instead of regexp >>>>> "Y" == Yvon Thoraval writes: Y> regex.rb:19: warning: string pattern instead of regexp; metacharacters Y> no longer effective Well, the message say that ruby will not interpret metacharacter (this is a change in 1.8). Create a Regexp object from the String Y> re.chop! re = Regexp.new(re.chomp) Y> str.gsub! re, "#{st}\\&#{en}" Y> print str, "\n" Y> end Guy Decoux