Extended contains() and replace() to accept expression operands