From: James Edward Gray II Date: 2004-10-06T00:27:59+09:00 Subject: Re: Regexp match question on interpolated strings... On Oct 5, 2004, at 9:44 AM, Brian Schr�der wrote: > This would be: > .sub(/^(.+?)\#\{.+\}/m, '\1') > ^ > Why are you preferring the greedy match? If it's know there are no braces in the string save the #{ ... }, I think it's much preferable. {}s are certainly allowed in Ruby code. > And if I get it right this substitutes > "name = #{person.first_name+" "+person.last_name} ... Ok?" > to > "name = ... Ok?" > > I don't think that is what is asked? Or am I wrong? Hmm, rereading the original message, I believe you are right. My apologies. James Edward Gray II