In the Xcode-Menu Find>Find and Replace in Project...(or alternatively ⌥⇧⌘F). You get at the place, where you normally find the Project Navigator, now the Find Navigator. At the very top select instead of 'Text' 'Regular Expression':

Then type in the first Text Field (notice: my method doesn't work, if your blocks contain inside the curly braces some more curly braces)
( *)\.doOnComplete \{([^\}]*)\}
Press enter after it. Below the second text field, there should show all occurrences of the .doOnComplete
Block.
Now you can type (every '[enter]' means control+q followed by enter)
$1.do([enter]$1onComplete: {$2}[enter]$1)
in the second text field. After that, you should select one of the found occurrences below the second text field and press the 'Replace' Button. If the replacing is ok and everything in the block is still there, you can press the 'Replace All' Button, and everything in the whole project should be replaced.