examples of using custom replacement patterns to update the context.