in reply to how can i align two two strings

What exactly do you mean by "align"?

From the example it seems that you are searching the Longest Common Subsequence