Val(str) * Val(Mid(str, InStr(str, "(") + 1)) * Val(Mid(str, InStr(str, "(") + 1 + Len(CStr(Val(Mid(str, InStr(str, "(") + 1)))) + 1))
yes this code is ok for this expression 2(2a2b), but it find only = 8 and not how many a and b ...anyway if i change the expression as 2(2a2b)2c2a2b4(2c2d) the...