Firstly what is your reason for doing this. The operator method is less readable than your original statements. Also, would it not be quicker to go through and do this by hand, unless of course you are dealing with hundreds or thousands of changes. It may take a while to write a script which performs your task to a suitable degree of accuracy (100%) if the statements aren't regular throughout.