in reply to doubt in string matching.

Why do you want to do it that way? index uses a very fast algorithm based on letter frequency to locate substrings.

(Update: Or did you already forget how to initialize an array? We can't help you if you can't even describe what you want accuratly. Why are you assining a string to an array? )

it doesnt seem to work. any ideas? thanks.

*What* doesn't seem to work? Did you forget to post the code?