There are **much** better solutions than modifying the text of your stored procedures, functions, and views each time the linked server changes. Here are some options:
1. Update the linked server. Instead of using a linked server named with its IP address, create a new linked server with the name of the resource such as `Finance` or `DataLinkProd` or some such. Then when you need to change which server is reached, update the linked server to point to the new server (or drop it and recreate it).
2. While unfortunately you cannot create synonyms for linked servers or schemas, you CAN make synonyms for objects that are located on linked servers. For example, your procedure `[10.10.100.50].dbo.SPROCEDURE_EXAMPLE` could by aliased. Perhaps create a schema `datalinkprod`, then `CREATE SYNONYM datalinkprod.dbo_SPROCEDURE_EXAMPLE FOR [10.10.100.50].dbo.SPROCEDURE_EXAMPLE;`. Then, write a stored procedure that accepts a linked server name, which queries all the potential objects from the remote database and (re)creates synonyms for them. All your SPs and functions get rewritten just once to use the synonym names starting with `datalinkprod`, and ever after that, to change from one linked server to another you just do `EXEC dbo.SwitchLinkedServer '[10.10.100.51]';` and in a fraction of a second you're using a different linked server.
There may be even more options. I highly recommend using the superior techniques of pre-processing, configuration, or indirection rather than changing human-written scripts. Automatically updating machine-created scripts is fine, this is preprocessing. Doing things manually is awful.