From: Nuralanur@... Date: 2005-09-27T17:53:39+09:00 Subject: Re: In search of a kind of converse to sub/gsub -------------------------------1127811213 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Axel asked for a method find_what_to_replace > ... such that for > > replace_what_substring,replace_it_by > =string1.find_what_to_replace(string2) > > the statement > > string2 == string1.gsub(replace_what_substring,replace_it_by) > > holds true . > > Has anybody done that already? Does Diff::LCS do what you want? It returns the differences between strings. (You can get it from http://rubyforge.org/frs/?group_id=84 or via rubygems) Cheers, Dave Thank you , Dave - that's 100 out of 100 points! Best regards, Axel -------------------------------1127811213--