Li Ngok Lam wrote:

> Hi all,
>
> That's about the whole story, but I'll make it short.
> For example, I have a list like this :
>
> 123ABCDEF456
> 123456
> 654WXYZ321
> 987654321
> ABCDEF123456
> WXYZ321
>
> By user's INTEGER

Please don't do this.  The word "integer" is not being used as a global
constant.  it doesn't ehlp us understand.

> input , I will have to find how many similar
> patterns are matched within the list according to certain chars

You already told us, accurately, that you sought an integer here.  Please,
don't even mention chars in input.  The relevant user input is its integer
value, which you later tell us is the minimum length desired for matches
between elements.

> (user's
> input ) :
>

Reading the passage above as originally written, I assume that only the
strings which contained the character '3' would be considered in the match.

>
> For example, I input '3', then I will get the result like this :
>
> Res1: 123ABCDEF456 is similar to 123456    #each contains char '3'
> Res2: 123ABCDEF456 is similar to ABCDEF123456   #each contains char '3'
> Res3: 654WXYZ321 is similar to 987654321   #each contains char '3'
> Res4: 654WXYZ321 is similar to WXYZ321   #each contains char '3'

How about:

"I want to compare a set of strings for pattern matches.  The user will
enter a number, then the program should seek, for each string in the array,
all strings for which a pattern of that length can be found in common
between them."

Please don't throw in technical termiology that is not necessary to
understand the problem.  You will get much better help, qand write much
more powerful code, by keeping things as simple as you can make them.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to