[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Finding the common textual denominator



On Sunday 06 March 2005 17.45, Bruno Hertz wrote:
> On Sun, 2005-03-06 at 16:20 +0000, Lee Braiden wrote:
> > Now I'm really confused.  How can you have a common denominator with
> > only one line?  How is "bb b" the "common beginning of" the string
> > "aa bbbcc"?  I think you need to tell us what you're really trying to
> > accomplish, rather than asking for solutions to hypothetical
> > situations :)
>
> I guess he meant 'without the one' and not 'with the one'. Olle, check
> what you wrote please before posting.
>
> Regards, Bruno.

Exactly.. I'm very sorry for the confusion. It should be "Without the one 
starting with "aa", it should return "bb b"".

So..

aa bbbcc
bb bccdd
bb bbcdd
bb bbbdd

..would return "" (nothing) since there is no common denominator beginning 
these lines. And..

bb bccdd
bb bbcdd
bb bbbdd

..would return "bb b".

If there is only one line I guess it is a question of definition whether 
it should return the whole line or nothing at all.

Is there any application that does this already, or will I have to write 
something myself?

Olle



Reply to: