I'm not quite sure I understand..
If you would like to compare if both instance variables are the same there are easier methods..
object compare variableA = object.variableB
if you'd like to know if variableB exists within variableA you could use the expression
system compare two values : find(object.variableA,object.variableB) is not -1
and if you'd just like to know if the last character of variableA is the same as VariableB
system compare two values : right(object.VariableA, 1) = object.variableB