I&#039;m trying to determine what characters are mismatched between two strings using regular expressions. For example, if the input string = AABCBD and the string you want to compare against = ABCCBA (as the pattern), what would the pattern be to get the following matches (firstIndex, value, length):<BR>M1 -- 1,A,1<BR>M2 -- 2,B,1<BR>M3 -- 5,D,1<BR><BR>These matches represent the positions and the values of the mismatched characters.<BR><BR>I&#039;ve only used simple regex in the past. I&#039;ve been able to almost get the results that I want with the following pattern but it seems that having duplicate characters (in different positions) throws it off. Here&#039;s what I&#039;ve done:<BR><BR>input string = AABCDA<BR>pattern = ([^A])(/D{1}[^B])?(/D{2}[^B])?(/D{3}[^C])?(/D{4}[^C])?(/D{5}[^D])?<BR><BR>desired results (matches, M) (firstIndex, value, length):<BR>M0 -- (1,A,1)<BR>M1 -- (4,D,1)<BR>M3 -- (5,A,1)<BR><BR>actual results:<BR><BR>M0 -- (2,B,1)<BR>M1 -- (3,C,1)<BR>M3 -- (4,D,1)<BR><BR>Any help would be greatly appreciated!!<BR><BR>Thanks,<BR><BR>David Perry<BR>