example: Given string is: ABCXXYYZZ second string two position switched to XXYYZZABC how to identify my second string is switched two common string. there are 2 common string matched "ABC", "XXYYZZ" Thanks, Murali.