to replace with
The preposition is part of the word. Without it the answer is wrong in ripiti: sustituir por, not sustituir.
Remember sustituir por for good. ripiti brings the word back just before you forget it, with these sentences. Free, no account needed, works offline.
practise sustituir por in ripiti