in reply to how can i align two two strings
From the example it seems that you are searching the Longest Common Subsequence