How to format nested REPLACE statements cleanly and efficiently

Replace is one of my favourite T-SQL string functions. One of its main attractions is the ability to remove noise words from a large chunk of text. Most of the time though, you are likely to have quite a few word patterns that you want to filter out, and this will make the code hard to read, see the example below:

select replace(replace(replace(message, 'Microsoft (R) SQL Server Execute Package Utility', ''), 'Version 10.0.5500.0', ''), 'Code: 0xC0202009', '') from msdb..sysjobhistory where run_status = 0

It only takes three to four nested replace statements to make the whole select statement look like a wiggly snake, not to mention those hard to track commas and brackets.

Below is a much better way of writing nested REPLACE statements:

select replace(replace(replace(message
    , 'Microsoft (R) SQL Server Execute Package Utility', '')
    , 'Version 10.0.5500.0', '')
    , 'Code: 0xC0202009', '')
from msdb..sysjobhistory
where run_status = 0

By utilising one line per REPLACE, it instantly becomes clear what you are replacing and the people maintaining you code will thank you for the readability.