When nano asks for each occurrence, press A to replace them all at once.
Open replace with Ctrl+\.
Ctrl+\.