I was looking for a way of, given two variables called A and B, obtaining a new variable called AB. My idea was doing simple pattern matching, e.g.
A B/.x_ y_->ToString[x]<>ToString[y]
But this rule outputs
xy instead of the desired
AB. Is there a way of obtaining the desired output? Thank you for your time.