Find and Replace rules allow you to transform the source metadata before deploying them to the target Org. Some of the examples where Find & Replace rules can be used:
You wish to ignore specific user permissions related to profiles that might cause deployments to fail.
You wish to replace all the IP ranges with the values specific to the target Org
You wish to remove manage package components from your deployments.
Adding Find & Replace Rules
In the deployment details page, select the "Deployment Options" tab, then expand the "advanced options" and you will see the text area to enter Find & Replace rules as the screenshot below.
Find & Replace rules should be in YAML format. The syntax is as simple as the sample below:
- find: '192.168.1.1'
- find: '192.168.1.255'
- find: '(?s)\s*(.*?)'
- find : '(?s)\s*(.*?)'
replace : ''