Substitutes a substring pattern with an object property value.