You specified a class in a [:class: construct in string2 that was not lower or upper, or you specified [:lower:] or [:upper:] in string2 without specifying the other one at the corresponding spot in string1.
Specify string2 in a form that gives an equivalent result without using the [:class:] construct, or specify [:upper:] or [:lower:] (as appropriate) at the correct point in string1.