Hi,

I have to strings ABAC and ABECAB. I wan to find the positions of ABAC (each character) in the second string.

That means:
That A is in the 1st position of the second string.
B is in the 2nd position of the second string
A (Since I used the first position already) will be the 5th position of the second string
C is in the 4th position of the second string.

I know how to find it when the characters are not repeated. The problem comes when I have the same character more than two times in the first and second string; this is because I am always starting counting from the first position of the second string. That is why instead of getting the second letter A in the 5th position I get it again in the 1st position.

I would like to be able to perform this with the option of having more that two repeated character in each string. Ex. First String ABAAC Second String ABAEBAC

Thank you!