Find and replace string in body
find-and-replace policy finds a request or response substring and replaces it with a different substring.
Set the policy's elements and child elements in the order provided in the policy statement. Learn more about how to set or edit API Management policies.
<find-and-replace from="what to replace" to="replacement" />
|from||The string to search for. Policy expressions are allowed.||Yes||N/A|
|to||The replacement string. Specify a zero length replacement string to remove the search string. Policy expressions are allowed.||Yes||N/A|
- Policy sections: inbound, outbound, backend, on-error
- Policy scopes: global, workspace, product, API, operation
- Gateways: dedicated, consumption, self-hosted
<find-and-replace from="notebook" to="laptop" />
For more information about working with policies, see: