Substitute a substring pattern in the given string with a property value.